Is there any way to set up a local process, but have the output also go to a terminal that has SSH'd into my machine?


Is this helpful to you?

  Pipes over SSH

In this case the pipe is used to copy files, but perhaps this can help you to figure out what you need?

Also, the "tee" command will be of interest to you for sending output to multiple places.

  • 1
    that isn't quite what I was looking for, but it is interesting. the tee command is something I'm not too familiar with. Right now, I'm trying to connect two displays to the same screen session but I can't quite figure it out. a screen solution would be best because then I can literally pick up my session on any one of my terminals whenever I choose. Currently, I am using screen -dRR as part of my login script to try and take the session(s) I was using hostage from my old machines, but I would ideally like to be able to use any terminal simultaneously. – Ritwik Bose May 23 '11 at 20:57
  • 1
    Oh, for GNU Screen ("screen") just use the -x switch to connect to a session that's in use by someone else (and without disconnecting them). You'll have to explore the other switches like -d and -R in combination with this. You should also consider the features that allow you to name your screen sessions so that you can, for example, name a session after the user's login name. – Randolf Richardson May 23 '11 at 23:30
  • Regarding tee, it duplicates STDIN to STDOUT while also writing a copy to somewhere else (e.g., a file). – Randolf Richardson May 23 '11 at 23:31
  • 1
    Win for screen -x – Ritwik Bose May 24 '11 at 5:54
  • 1
    @RandolfRichardson It works beautifully and wonderfully and I thank you dearly for informing me of this. :D – Ritwik Bose May 24 '11 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.