Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Open a dtterm & execute commands via script

2 views
Skip to first unread message

Rick

unread,
Dec 10, 2000, 5:30:08 PM12/10/00
to
I'm trying to write a script that will open a dtterm, then execute
commands in it. Basically it will start a while loop.....got the while
loop part working, but how do I get it to open it's own dtterm to conduct
it's business?

--
Posted via CNET Help.com
http://www.help.com/

Rinus Broekmans

unread,
Dec 11, 2000, 4:07:36 PM12/11/00
to
Rick,

Try 'man dtterm' or 'man xterm' if the former is not available. This should
get you started. It's been a while since I've done what you want, but there
should be an option that lets you start a terminalwindow and execute a
command in it. Dtterm and xterm have mostly the same options, I believe.
Xterm -h (or dtterm -h maybe) might show some of the options aswell.

Rinus.

"Rick" <rick...@mindless.com> schreef in bericht
news:t380vgb...@corp.supernews.com...

JBClaunch

unread,
Dec 17, 2000, 12:48:09 PM12/17/00
to
If you're running under CDE, the fastest way to execute your script in a dtterm
would be to use "Create Actions" located in your Applications Folders on you
DeskTop Manager. By choosing an icon,
then entering your script lcoation for execution to be run as Xwindows, then
save, an icon is created in your home folder. The icon can be moved to your
desktop and will execute your script in a dtterm.

If that's not suitable then use "dtterm -e script"; the location of dtterm
should be in your PATH like xterm.

Jef Claunch

Jeff Howie

unread,
Dec 16, 2000, 8:31:41 PM12/16/00
to comp.uni...@list.deja.com
On Sun, Dec 10, 2000 at 10:30:08PM -0000, rick...@mindless.com wrote:
> I'm trying to write a script that will open a dtterm, then execute
> commands in it. Basically it will start a while loop.....got the while
> loop part working, but how do I get it to open it's own dtterm to conduct
> it's business?

With any type of xterm work-alike (like dtterm), you can use the '-e'
switch to specify a process to be run in the session. Once the process
is finished, the terminal closes.

So, you would have to write 2 different scripts, the master & the
slave.

<=master=>
#!/bin/ksh
dtterm -e slave &
exit 0
<==>

<=slave=>
#!/bin/ksh
while true; do
(many other useful commands...)
done
exit 0
<==>

Then you would run the master script.
--
thks.jeff


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages