Re: [Hampshire] Pipe issues

Top Page

Reply to this message
Author: Leo
Date:  
To: Hugo Mills
CC: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Pipe issues
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
> characters to overwrite the previous line. If it's doing that, you'll
> probably find that grep isn't handling the output right.

>
>    You could try something like this:

>
> program | tr [[:cntrl:]] \\n | grep -E -v remaining[[:space:]]*$
>
>    Hugo.

>


Worked brilliantly! thank you :)

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.

Leo