LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-06-2010, 12:59 AM   #1
Ben2K
LQ Newbie
 
Registered: Dec 2009
Location: Redmond, WA
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
Question 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.
 
Old 07-06-2010, 01:13 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192Reputation: 3192
man is your friend here ... have a look at -hold option
 
1 members found this post helpful.
Old 07-06-2010, 01:28 AM   #3
Ben2K
LQ Newbie
 
Registered: Dec 2009
Location: Redmond, WA
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by grail View Post
man is your friend here ... have a look at -hold option
That was quick!

Thanks.
 
  


Reply

Tags
bash, linux, sh, shell, unix, xterm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i run a script upon bootup, but in a terminal window xmrkite Linux - Software 6 09-29-2008 03:59 PM
Kde: open konsole window when running script sunpascal Linux - Software 5 04-14-2006 09:43 PM
Mozilla Firefox open new window script Pathian Linux - Software 17 08-12-2004 12:37 PM
Mozilla (official) Open New Window script tuxq Linux - Software 1 08-10-2004 07:43 PM
bash script - open new window running a command zippity Linux - Newbie 1 07-13-2004 11:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration