ARexx (18/23)

From:Neil Bothwick
Date:25 Jul 2001 at 09:33:14
Subject:Re: How do I:

Andrew Bruno said,

> Folks, my quest is to get to send commands to a shell.

> That is the mechanics. What I am a bit curoius about it waiting for the
> reply.

ARexx will wait for the command to return, but won't return any output,
only the return code (provided you have "options results" at the start
of your script). To read output you'll have to redirect it to a file and
read that file after the command has returned.

> If the command consists of actual commands and variables do I have to do
> anything or can I send it to the "CLI" as strings all stuck together?

> eg:

> part1 = 'this is '
> part2 = ' test'

> ADDRESS COMMAND
> part1 'a' part2

> Would that send:

> this is a test

Actually, it would be "this is a test" because you have used spaces to
join the strings as well as spaces within the strings.

I prefer to build the whole command into a single string, then I can
test with

say cmd
address command cmd
say RC

> I have something like that, but it doesn't seem to work. :(

Don't forget that if any of the command's arguments contain spaces,
you'll need to include them in double quotes.

Cheers

Neil



Neil Bothwick - New Media Editor, Amiga Active Magazine

If you consult enough experts, you can confirm any opinion.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of
VeriSign's FREE Guide "Securing Your Web Site for Business." Get it now!
http://www.verisign.com/cgi-bin/go.cgi?a=n094442340008000
http://us.click.yahoo.com/6lIgYB/IWxCAA/yigFAA/saFolB/TM
---------------------------------------------------------------------~->

ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/