[Discuss] bash output buffering
Edward Ned Harvey
blu at nedharvey.com
Fri Jun 15 09:07:37 EDT 2012
> From: Bill Bogstad [mailto:bogstad at pobox.com]
> Sent: Thursday, June 14, 2012 2:07 PM
>
> Can you be more specific about what you exact commands you are using?
> When I put the following into a file called foo:
>
> ===
>
> #!/bin/sh
>
> ping 127.0.0.1 > $HOME/xxx
>
> ===
>
> and then run
>
> "at -f foo now"
>
> The "tail -f $HOME/xxx" does exactly what you want (one line every
second).
Huh. Maybe the difference is /bin/bash versus /bin/sh
... Cuz ...
That's exactly what I'm doing.
Also, I did something like this: echo "/home/user/bin/script.sh" | at now
whereas, you did "at -f foo" ... it's hard to imagine that makes a
difference... Not it's not. It seems like that could very well make a
difference. Because in your case, you're essentially telling atd to run the
script, not /bin/sh or /bin/bash. So the way you submitted the script to
atd is just as likely to make a difference as the selection of which shell
to run....
Interesting...
More information about the Discuss
mailing list