On Mon, Apr 10, 2017 at 01:29:59PM -0700, Rick Stevens wrote:
> On 04/10/2017 12:46 PM, Gordon Messmer wrote:
...
> 
> That's correct. In both examples, the commands inside the double quotes
> and only what's inside the quotes are what's executed on the remote
> system. Everything else is executed on the local system, thus these
> three commands are entirely equivalent:
> 
>       ssh user_foo@1.2.3.4 "pgrep -f 'master_app' | wc -l" 2> stderr.log
>       ssh user_foo@1.2.3.4 2>stderr.log "pgrep -f 'master_app' | wc -l"
>       ssh 2>stderr.log user_foo@1.2.3.4 "pgrep -f 'master_app' | wc -l"
> 
> In all three the redirection is done on ssh's stderr and it's written
> to a "stderr.log" file in the current directory.

Might as well be complete:

        2>stderr.log ssh user_foo@1.2.3.4 "pgrep -f 'master_app' | wc -l"

is also equivalent

jl
-- 
Jon H. LaBadie                  jo...@jgcomp.com
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to