Wednesday, May 21, 2014 10:09 AM I am running below two programs
first program:
while read line
do
if (cat /etc/passwd | grep -w ^"userid")
then
echo $line
fi
done < serverlist
output:
userid:kjhfkjshd:hjgf:hsgdf:hsgbdf
server1
userid:kjhfkjshd:hjgf:hsgdf:hsgbdf
server2
second program:
while read line
do
if ( sudo /bin/ssh $line /bin/cat /etc/passwd | grep -w ^"userid" )
then
echo $line
fi
done < serverlist
OUTPUT
userid:kjhfkjshd:hjgf:hsgdf:hsgbdf
server1
it is not going to check second server. i am not able to find what is wrong in second program. first program is fine. can anybody help me please?