LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Run Script In New Window & Keep Window Open (http://www.linuxquestions.org/questions/programming-9/run-script-in-new-window-and-keep-window-open-818192/)

Ben2K 07-06-2010 12:59 AM

Run Script In New Window & Keep Window Open
 
This is probably dumb enough to belong in the newbie section, but...

How do I run a command or a script in a new window, and then hold that window open, so I can review the results?

For example, if I try:
Code:

xterm -e "tail ./foo"
A window opens, the command runs, and then the window immediately closes. If I try to add:
Code:

xterm -e "tail ./foo;read -p 'Press any key to continue...'"
all that changes is that
Quote:

Press any key to continue...
is echoed in the original window instead of the new one.

Doesn't matter if I try this from the command line, or from inside a shell script.

There must be a simple (obvious?) way to do this.

grail 07-06-2010 01:13 AM

man is your friend here :) ... have a look at -hold option ;)

Ben2K 07-06-2010 01:28 AM

Quote:

Originally Posted by grail (Post 4024839)
man is your friend here :) ... have a look at -hold option ;)

That was quick!

Thanks.


All times are GMT -5. The time now is 11:50 PM.