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

[ale] Syntax problem

Scott Warfield wrote:
> you need the quotes to pass everything as an argument to ssh to be
> executed by the remote server.  in this case, ps ax runs remotely piping
> the output locally to grep resulting in an attempt to kill a pid that
> may not exist at best... at worst, well, you can guess ;)
> answer to this.... escape $.  "\$1"
> ssh machine "ps ax|grep namd|grep -v grep| awk '{print(\$1)}'|xargs
> kill"

Oops, that's correct.  Again though you can rid yourself of the grep 
commands and do all that in awk.

Until later, Geoffrey