loop
Postado em 26/06/2008 por Rogerio - Categoria: Dicas Linux - Tags: ssh loop
Utilize a opcao "-n" ou "< /dev/null" na linha do ssh:
ERRADO:
#!/bin/sh # run hostname command on systems listed below; will only work for # the first host while read hostname; do ssh $hostname hostname done < example.com example.org EOF
CERTO:
#!/bin/sh while read hostname; do ssh $hostname hostname < /dev/null done < example.com example.org EOF