Good Morning,
I want to set up a script that will ssh into a host and check for a line in a file. If the line is there it prints "Yes" and if its not there it prints "No".
Here is the lines I have so far:
Code:
#!/bin/sh
for HostName in `cat /home/techs/hostlist | awk '{print $1}'`
do
echo $HostName
ssh root@$HostName "grep EXCENTUS_RETAIL_ID /usr1/vision/vision.cnf"
done
At this point, if the line EXCENTUS_RETAIL_ID is in the file then I want to Print "Yes" and if it is not there, I want to print "No".
Any assistance is greatly appreciated. Thanks.