Hi,
The following code is causing my while loop to end. The reason is the ssh code. I need to go to another host and display the last line of each file that exists. How ccan I do this without breaking out? I only get the output from one file when there are actually multiple files to display lines from.
ssh ${FRHOST} ls "${CHKOUT_FILES}/${CPFILE}.ckoutlog*" | awk -
F"chkoutlog\/" '{print $2}' > $CHKOUTLOG_LIST
while read line
do
print "\n-> ${CHKOUT_FILES}/${line}\n exists on ${FRHOST}"
MSG=`ssh ${FRHOST} tail -1 "${CHKOUT_FILES}/${line}"`
print "${MSG}"
continue
done < $CHKOUTLOG_LIST
The following code is causing my while loop to end. The reason is the ssh code. I need to go to another host and display the last line of each file that exists. How ccan I do this without breaking out? I only get the output from one file when there are actually multiple files to display lines from.
ssh ${FRHOST} ls "${CHKOUT_FILES}/${CPFILE}.ckoutlog*" | awk -
F"chkoutlog\/" '{print $2}' > $CHKOUTLOG_LIST
while read line
do
print "\n-> ${CHKOUT_FILES}/${line}\n exists on ${FRHOST}"
MSG=`ssh ${FRHOST} tail -1 "${CHKOUT_FILES}/${line}"`
print "${MSG}"
continue
done < $CHKOUTLOG_LIST