I have a script like this:
if rsh $server grep "string" /usr/path/file.txt
then
echo "yes"
else
echo "no"
fi
Basically I want to check the file in remote server containing some specific strings. It doesn't work and always display "yes" whatever I put into "string".
However, if I remove "rsh $server", which means running locally, and put that file into local, it is working fine.
Does anyone know what the problem is? How can I modify my script?