echo "`${BOLD}` ***** Checking CoreFile Creation *****`${UNBOLD}`"
echo "========================================================"
IFS='|'
cat configMachineDetails.txt | grep -v "^#" | while read MachineType UserName MachineName
do
export CHK_COREFILE=`ssh -f -T ${UserName}@${MachineName} ls ~/corefiles | wc -l|sed 's/ //g'`
if [ $CHK_COREFILE -gt 0 ]
then
echo "CHK_COREFILE $CHK_COREFILE number of core files are created"
echo " "
export CHK_COREFILES_NAME=`ls -lrt ~/corefiles`
echo " Name of the Files $CHK_COREFILES_NAME "
echo "MachineType $MachineType UserName $UserName MachineName $MachineName"
echo "-----------------------------------------------------"
fi
done
After ssh to different machine it ls to the path of the machine on which the code is running.Hence it says the path not found.
export CHK_COREFILE=ssh -f -T ${UserName}@${MachineName} ls ~/corefiles | wc -l|sed 's/ //g'
How to handle this ? working on (ksh) solaris.