[NTLUG:Discuss] Shell script?
Lance Simmons
lance at lsimmons.net
Mon Jan 12 20:43:15 CST 2004
* Wayne Patterson <wjpatterson at charter.net> [040112 20:01]:
> I'm sure this is an easy thing to do IF you know how, and I don't. I
> want to write a script that will open a console, cd to a certain
> directory and execute a command to start another program in that
> console. Does that make any sense? And if so what would it look like?
When you say open a console, do you mean open an xterm? If so, how
about:
xterm -e 'cd /foo/bar; /bin/foo'
(you can look at the man page for whatever x terminal emulator you're
using, such as gnome-terminal, to see what the syntax is)
if you mean a new shell, how about:
/bin/sh -c 'cd /foo/bar; /bin/foo'
--
Lance Simmons
When Turing machines are outlawed, only outlaws will have
Turing machines.
More information about the Discuss
mailing list