Executing another script from xterm
HI,
I am trying to execute another script from xterm using -e option. but whenever i run xterm -e script-filename one window flashes and went off in sec. don't know what is the problem here... just to check this created a script which shows date,time and lists files eg: date.sh: #!/usr/bin/bash echo `date` echo `time` exec ls running this script from shell works fine. but executing same script from xterm fails. xterm -e date.sh --> pops up window and closes (window does not remains) even tried with this xterm -e date.sh & --> same observation need help in this, i want new terminal to remain and execute the script. |
As soon as the last command executes, it is closing the window. Try a sleep statement if you want the window to remain up for a certain amount of time. You can also try putting a read statement at the end. That should make it wait for some user-input before closing.
|
Ypu can alos use the -hold option which will keep the xterm open until you click it away.
|
try...
Code:
xterm -e ksh -c 'date && read' # stay up until you press return |
Thank you all for ur response...
i got it what i need with -hold option. eg: xterm -hold -e /bin/bash date.sh |
yes, but -hold is not standard xterm so it won't work on solaris, say
|
All times are GMT -5. The time now is 07:40 AM. |