Saturday, May 4, 2024
46
rated 0 times [  46] [ 0]  / answers: 1 / hits: 22329  / 3 Years ago, mon, november 22, 2021, 7:59:35

I want to run a command foo on one terminal and pass the result to another terminal. Is it possible to do this ?


More From » command-line

 Answers
4

Yes, it is. A picture worth a thousand words:



radu's terminal



So, you have to redirect the output of your command using > operator to /dev/pts/#. You can find # using who or w command. If tou want to redirect and the errors, use:



<command> >& /dev/pts/#

[#24158] Monday, November 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
;