Closed RafayGhafoor closed 4 years ago
In your example it's not actually hanging the terminal, but instead you just don't see anything as the stdout is redirected to the output
file. If you do a tail -f output
from another terminal you will see what I mean.
But of course this is not really intuitive, nor probably even useful. What would you expect to happen when redirecting the output, or what use-case did you have in mind?
The case in which the output was needed was inside linux emergency shell (tty) where mouse didn't work and the output had to be copied and sent to other computer, the tty terminal didn't have support for copying the output of a command (as far as I remember), and the output was needed to be redirected to a file, which was then uploaded to pastebin (ix.io) and sent to the user by some script.
The workaround for it was to add &
after the command: tty-share > output &
and it worked though tty-share was unable to work inside tty terminal, I don't know why as when opened on another browser, it would just open the webpage with cursor at the beginning and nothing after it.
Maybe the tty-share -logfile outout
will help in that case? The output printed in that file is not pretty, and I don't even know if it works well, but maybe worth trying.
@elisescu, this works. Thank you!
tty-share > output # hangs the terminal.