Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] bash output buffering



> 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...




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org