On 04/09/2017 07:23 AM, bruce wrote:
hey...

the following test works..

ssh  user_foo@1.2.3.4 pgrep -f  'master_app' | wc -l


however, i realized that in some cases I was seeing a "ssh connection
timeout" so I looked into how to capture the complete STDERR from the
local side.

ssh  user_foo@1.2.3.4 "pgrep -f  'master_app' | wc -l " 1>&2

runs but not sure it will actually do what I want...

any thoughts?  net searching/SO hasn't given me the doh moment yet..

I was about to give an answer, but after looking over your commands a few times, I'm now quite confused about what you're trying to do. Those two commands are very different from each other. The first one will run the "wc -l" on the local computer and the second one will run it on the remote computer. The "1>&2" will redirect the stdout to stderr, so all your output will be coming out in stderr. If you want to include stderr in stdout, use "2>&1". If you just want to save stderr somewhere, you can use "2>filename".

If you want better help, then try describing in more detail what you're trying to do.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to