I want to create a script wherein I can grep a particular word from a specific path of remote server and display that whole grep sentence in the output.
Currently, I have to take access to the target server, then to go in the particular path and then use the grep command.
#!/usr/bin/ksh
clientID="00000"
print -n "\nEnter the ID (Enter ybr for ybr_ybrfndt): $1"
read clientID
print "$clientID"
for HOST in $(cat qa_servers.txt ) ;
do
ssh $HOST "uname -a"
cd /apps/WebSphere/NA70_TBA/config/cells/CellV70_TBA
grep $clientID resources.xml;
done