for i in $LIST
do
CFG=`ssh $i "cat log.txt|awk '{print $2}'"`
for j in $CFG
do
echo $j
done
done
Say I want to print 2nd field in the log file on a couple remote host. In above script, print $2 doesn't work. How can I fix this? Thanks.