I am running a shell script with a while loop and it exits with the below error, how could I avoid it or catch the error and let the loop to continue ? ie how could I handle the exception
stty: standard input: Invalid argument
Following are the script I am trying but it exit from the loop after the first iteration.
hfile=/tmp/prty.txt
while read property
do
hostname=`echo $property | awk '{print $1}'`
echo $hostname
ssh -l gger $hostname ". <userhome>/.bash_profile; ggsci -v; exit << EOF > /tmp/gg.txt
EOF"
done < $hfile
file hfile
==========
user1 pas1
user2 pas2
user3 pas3