Re: [Hampshire] Pipe issues

2009-08-05 Thread Chris Dennis
Simon Reap wrote: > > (BTW, did anyone else read the subject of this email and assume it was > carrying on the armoured ethernet thread?) No, I thought it was about smoking. Virginia shag, anyone? cheers Chris -- Chris Dennis cgden...@btinternet.com Fordingbr

Re: [Hampshire] Pipe issues

2009-08-05 Thread Leo
Andy Smith wrote: > Hi Leo, > > On Wed, Aug 05, 2009 at 09:05:42PM +0100, Leo wrote: >> Still don't understand why anacron requires my script to have it though, >> when the script works fine when called directly from the command line. > > I'd love to know why this ever worked. Things like that

Re: [Hampshire] Pipe issues

2009-08-05 Thread Andy Smith
Hi Leo, On Wed, Aug 05, 2009 at 09:05:42PM +0100, Leo wrote: > Still don't understand why anacron requires my script to have it though, > when the script works fine when called directly from the command line. I'd love to know why this ever worked. Things like that bother me. As far as I am awar

Re: [Hampshire] Pipe issues

2009-08-05 Thread Leo
Hugo Mills wrote: > On Tue, Aug 04, 2009 at 10:18:32PM +0100, Leo wrote: > >I have a thought... is this program normally run interactively? If > so, does it present a countdown of remaining time or bytes? If so, > it's quite likely that it's using CR, reverse tabs, or other control > character

Re: [Hampshire] Pipe issues

2009-08-04 Thread Leo
Hugo Mills wrote: > >I have a thought... is this program normally run interactively? If > so, does it present a countdown of remaining time or bytes? If so, > it's quite likely that it's using CR, reverse tabs, or other control > characters to overwrite the previous line. If it's doing that, y

Re: [Hampshire] Pipe issues

2009-08-04 Thread Hugo Mills
On Tue, Aug 04, 2009 at 10:18:32PM +0100, Leo wrote: > Bob Dunlop wrote: > > > > 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. > >

Re: [Hampshire] Pipe issues

2009-08-04 Thread Leo
Simon Reap wrote: > > I would put the grep string in single quotes - anacron may be messing up > the trailing $ > > (BTW, did anyone else read the subject of this email and assume it was > carrying on the armoured ethernet thread?) > That didn't help either, but it did give me an idea. I did

Re: [Hampshire] Pipe issues

2009-08-04 Thread Leo
Bob Dunlop wrote: > > 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

Re: [Hampshire] Pipe issues

2009-08-04 Thread Leo
Unfortunately that didn't make a difference. Jim Kissel wrote: > > > 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

Re: [Hampshire] Pipe issues

2009-08-04 Thread Bob Dunlop
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

Re: [Hampshire] Pipe issues

2009-08-04 Thread Simon Reap
Leo wrote: > #!/bin/bash > > program | grep -v "remaining\s*$" > > I would put the grep string in single quotes - anacron may be messing up the trailing $ (BTW, did anyone else read the subject of this email and assume it was carrying on the armoured ethernet thread?) -- Please p

Re: [Hampshire] Pipe issues

2009-08-04 Thread Jim Kissel
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 ana

[Hampshire] Pipe issues

2009-08-04 Thread Leo
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 always get an email