I was wondering if there were a simple way to open a second terminal to display data. So I have a program running in a terminal, and I was wondering if it’d be possible for that program to open a second terminal to which I could output information for the user to read (leaving the other terminal alone).
Share
Okay, I don’t know what operating system you’re using or what’s your console of choice, but on my Ubuntu 12.10 installation this opened up an
xtermwindow with my results:As for an explanation:
-holdprevents the window from closing as soon as the program executes.-especifies what program and its arguments are to be run (the/bin/bash ...part.)./bin/bashinvokes the unix shell bash-lmakes bash act as if it had been invoked as a login shell-cwill receive console outputechodisplays a message on the screen.Check the man pages for
xtermandbashfor more information.If you add more details, perhaps we can clarify a better answer although, truthfully, I prefer Sergio’s answer of outputting to a file and having another console tailing that file.