|
While Read problem
Hello,
I have this simple script
while read name
do
ssh $name "hostname > /tmp/$name.txt"
ssh $name "/opt/ignite/bin/print_manifest | grep Main >> /tmp/$name.txt"
ssh $name "getconf MACHINE_SERIAL >> /tmp/$name.txt"
ssh $name "ioscan -kfnC processor | grep processor | wc -l >> /tmp/$name.txt"
ssh $name "getconf MACHINE_MODEL >> /tmp/$name.txt"
ssh $name "uname -a >> /tmp/$name.txt"
ssh $name "scp /tmp/$name.txt marques:/home/pilga/$name.txt"
ssh $name "rm /tmp/$name.txt"
done < /home/pilga/man_blade.txt
And the file to read the names from is this;
anderson
albers
amon
acheson
doornbos
daigh
drogo
donnelly
revson
boutsen
danner
dalmas
modena
moss
massa
montoya
When i run this script it reads the first name (anderson) but once it has done all the ssh commands it just exits out and does not go to the next line........Guess i have made some obvious error but i cannot see it....
|