Re: script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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)

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux