[CentOS] script help

Stephen Harris lists at spuddy.org
Fri Oct 26 13:44:38 UTC 2007

On Fri, Oct 26, 2007 at 06:56:05PM +0800, Anup Shukla wrote:

> MOUNTER=`ssh $i "mount | grep data | awk '{print \\$1,\\$2,\\$3}'"`
> This is what i tried and worked for me.

Why not be simpler, run the "mount" on the remote machine but the grep
and awk on the local machine; no quoting issue at all then

  MOUNTER=`ssh $i mount | grep data | awk '{print $1,$2,$3}'`

(more network data, less remote processing)



More information about the CentOS mailing list