Re: remote ssh execution puzzle

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

 



Todd Zullinger wrote:
> Phil Meyer wrote:
>> $ ssh otherhost "uptime | awk '{print \$1}'"
>> awk: cmd. line:1: {print \}
>> awk: cmd. line:1:        ^ backslash not last character on line
> 
> Hmmm, it works for me.  I tested against remote hosts running
> openssh-4.2p1 and openssh-3.1p1, as well as against a more current FC6
> openssh server (4.3p2-19.fc6).  Is there something funky about the
> shell on 'otherhost' or perhaps the version of awk?
> 
> 
The shell on 'otherhost' should not make a difference. It is the
shell on the host running the ssh command that should be changing
/$1 to $1 before sending to "otherhost'. Now, running just the
awk '{print \$1}' on the local host will fail, generating that type
of message.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux