On Tue, Aug 04 at 08:56, Leo wrote:
> I've got a shell script that calls a program and pipes its output to
> grep, i.e.
>
> #!/bin/bash
> ....
> program | grep -v "remaining\s*$"
> ....
>
> When I run the script this works fine (i.e. no lines output ending in
> remaining). However if I set the script to run using anacron then I
Whos turning the \s into a space I wonder ?
It's not a bash syntax that I recognise, nor a grep one ?
Are you using csh for your interactive session ?
Try the following in your script.
program | grep -E -v "remaining[[:space:]]*$"
That's a combination I know works with grep regardless of the shell used.
Don' forget the -E
--
Bob Dunlop