I have a section of code that looks like:
while IFS= read -r line
do
(tab)...
(tab)...
(tab)ssh root@${ipaddress} <<-EOF
(tab)...
(tab)...
(tab)EOF
echo $done with ${ipaddress}
done < file.dat
There are multiple lines within 'file.dat' that contain the ${ipaddress} variable, however, the above script only runs for the first line of data. If I take out the ssh / EOF section, it will properly loop through all of the lines within file.dat. What am I missing?