running in an xterm

Started by tom, September 07, 2008, 11:41:10 AM

Previous topic - Next topic

tom

hey guys,



most Terminal Emulators can be given an "-e" option to run programs.  If I type "xterm -e /path-to-my-script"  an xterm fires up and runs the script.



is there a way to open an xterm in a script which then executes the script that opens it? (yes, convoluted..)



I want to click a button to run a script in an xterm.  the way I do it now is to write a shell script that starts the xterm that starts the script, and I'd like to reduce it down to one step.



I just confused myself.

:-)

Lutz

#1
try: (exec "xterm -e myscript")

tom

#2
That will work if I include it in myscript itself?  Wouldn't that loop forever?

aron

#3
Quote from: "tom"That will work if I include it in myscript itself?  Wouldn't that loop forever?


If you call it allways then..



Not forever, but a long time I guess. It becomes a Recursive execution of the script and I think it needs more and more memory until there is no memory left, but maybe something else can occure.



I remember i read about an loop that looked like a newer ending loop but it was stopt by an (hardwar-related) exception and the execution was then restarted from the first line on that platform.
newLISP browser: (print (replace \"<[^>]*>\" (get-url (read-line)) \"\" 0))