Saturday, May 18, 2024
46
rated 0 times [  46] [ 0]  / answers: 1 / hits: 22330  / 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
whipstder questions
Wed, Nov 9, 22, 09:45, 2 Years ago
Tue, Sep 14, 21, 10:54, 3 Years ago
Sun, May 28, 23, 03:52, 1 Year ago
Sat, Jul 17, 21, 07:10, 3 Years ago
;