________________________________ From: Nico Kadel-Garcia <nkadel at gmail.com> To: CentOS mailing list <centos at centos.org> Sent: Thu, March 17, 2011 6:31:15 AM Subject: Re: [CentOS] 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 at server "grep -c ^processor /proc/cpuinfo" 4 Thanks Sheraz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20110317/fc4fb562/attachment-0005.html>