this shell works,it read each line of the file and output
#!bin/bash
while read line
do
echo $line
done < inputfile
---------------------------
but when i add an rsh command within the loop, shell only reads the first line of the inputfile and stops.
#!bin/bash
while read line
do
echo $line
rsh 10.188.15.24 ls > fff
done < inputfile
anybody know what's wrong with that?and how should i fix it?
thanks
#!bin/bash
while read line
do
echo $line
done < inputfile
---------------------------
but when i add an rsh command within the loop, shell only reads the first line of the inputfile and stops.
#!bin/bash
while read line
do
echo $line
rsh 10.188.15.24 ls > fff
done < inputfile
anybody know what's wrong with that?and how should i fix it?
thanks