host1$ ssh host2 cmd1 | cmd2
Will cmd2 run on host1 or host2?
e.g.:
host1$ ssh host2 ls -1 / | wc -l
In this example, will wc -l run on host1 or host2, why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will run on the local host, because shell will recognize ‘|’ as pipe before invoking ssh.