Re: grep contents of file on remote server

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



On 9/24/2010 12:50 PM, Tim Dunphy wrote:
> Hello,
>
>   I am attempting to grep the contents of a key file I have SCP'd to a
> remote server. I am able to cat it:
>
> [code]
> [bluethundr@LBSD2:~]$:ssh root@sum1 grep `cat /root/id_rsa.pub`

Put single quotes around the whole command you want to send to the 
remote.  Otherwise your local shell is going to process the backtick 
expansion before anything else.  And grep is just as capable of reading 
the file as cat anyway.

-- 
   Les Mikesell
    lesmikesell@xxxxxxxxx



_______________________________________________
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