From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
To: CentOS mailing list <centos@xxxxxxxxxx>
Sent: Thu, March 17, 2011 6:31:15 AM
Subject: Re: ssh remote execute awk problem
>> grep ^processor /proc/cpuinfo | wc -l
>> Or:
>> ssh -l $TARGETUSER $TARGETHOST "[ -e /proc/cpuinfo ] -a grep
^processor | wc -l"
No need to use "wc -l" when grep is enough. E.g
ssh root@server "grep -c ^processor /proc/cpuinfo"
4
Thanks
Sheraz
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos