15:15 02/04/2008

clifoo 1 - ssh and loops

ssh "eats" standard input when run in a shell loop:

tom@snoopy:~$ while read host
> do
> ssh $host cat /etc/issue.net
> done << EOF
> snoopy
> droopy
> pluto
> EOF
Debian GNU/Linux lenny/sid

-n prevents this annoying default behaviour
tom@snoopy:~$ while read host
> do
> ssh -n $host cat /etc/issue.net
> done << EOF
> snoopy
> droopy
> pluto
> EOF
Debian GNU/Linux lenny/sid
Debian GNU/Linux 4.0
Debian GNU/Linux 4.0

Syndicate content