Re: ssh stderr question

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

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux