[comp.sys.amiga.tech] more 1.4 command wishlist

mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) (08/09/89)

This is the dual of the request for commands that are more amenable to
being started from other commands: Commands whose output is more
amenable to being used by other commands.

Simple example: It'd be nice if stack's output was "stack <bytes>"
instead of "Current stack size is <bytes>" - or that you could make it
do that. Why? How about a script like:

stack >ram:resetstack
stack 50000
; run some thing that needs 50K of stack
execute ram:resetstack

Another example: Make search create ouput with file names & lines on
one line, instead of filename, multiple lines. Reason: so I can use it
to build a "define database", like so:

search >defines #?.h define

Finding a define - both value and file - is easy: you do "search
defines SYMBOL"

Once again, it'd be nice if the output from all commands was examined,
and changed (or flags added to make it change) to something more
suitable for feeding to other commands (including execute).
	
	<mike
--
Es brillig war. Die schlichte Toven			Mike Meyer
Wirrten und wimmelten in Waben;				mwm@berkeley.edu
Und aller-mumsige Burggoven				ucbvax!mwm
Die mohmem Rath' ausgraben.				mwm@ucbjade.BITNET

johnl@tw-rnd.SanDiego.NCR.COM (John Lindwall) (08/10/89)

In article <1989Aug8.214011.3351@agate.berkeley.edu> mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
>
>
>Simple example: It'd be nice if stack's output was "stack <bytes>"
>instead of "Current stack size is <bytes>" - or that you could make it
>do that. Why? How about a script like:
>
>stack >ram:resetstack
>stack 50000
>; run some thing that needs 50K of stack
>execute ram:resetstack
>
> [Other examples deleted]

My first reaction was one of agreement.  Assuming Arexx is part of the 1.4
release, though, means we could use its extensive string handling capabilities
to handle these verbose outputs.  It would also cool to have invocation of Arexx
scripts without prepending 'rx', just like with 1.3 we can run scripts without
prepending 'execute' to the command line.  Perhaps the same mechanism that
WShell uses could be employed (or maybe a Rexx protection bit --- UG- forget
I said that!).

>Once again, it'd be nice if the output from all commands was examined,
>and changed (or flags added to make it change) to something more
>suitable for feeding to other commands (including execute).
>	
>	<mike

I suppose we will have a nice bit of confusion with 1.4 since both Arexx and
AmigaDOS scripts will be present to perform script file functions.

Summary
of my opinion: Arexx will allow more power in scripts to overcome other
oddities of AMigaDOS commands, but I agree with your suggestion of devoting
some effort to improving command output messages.

----------------------------------------------------------------------
John Lindwall                            johnl@tw-rnd.SanDiego.NCR.COM
           "Above opinions are my own, not my employer's"
   Health is merely the slowest possible rate at which one can die.
-- 
----------------------------------------------------------------------
John Lindwall                            johnl@tw-rnd.SanDiego.NCR.COM
           "Above opinions are my own, not my employer's"
   Health is merely the slowest possible rate at which one can die.

shadow@pawl.rpi.edu (Deven T. Corzine) (08/10/89)

On 9 Aug 89 22:53:54 GMT,
johnl@tw-rnd.SanDiego.NCR.COM (John Lindwall) said:

John> It would also cool to have invocation of Arexx scripts without
John> prepending 'rx', just like with 1.3 we can run scripts without
John> prepending 'execute' to the command line.  Perhaps the same
John> mechanism that WShell uses could be employed (or maybe a Rexx
John> protection bit --- UG- forget I said that!).

They really should do this.  No need for a separate bit.  Use the same
script bit, if the first two characters are "/*" then it's an ARexx
script.  Otherwise, assume it's an Execute script.  [Actually, pulling
"#!" from Unix scripts would be a good idea.]

Deven
--
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2214 12th Street, Troy, NY 12180       Phone:  (518) 271-0750
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.

peter@sugar.hackercorp.com (Peter da Silva) (08/11/89)

In article <1989Aug8.214011.3351@agate.berkeley.edu>, mwm@mica.berkeley.edu (Mike (I'll think of something yet) Meyer) writes:
> This is the dual of the request for commands that are more amenable to
> being started from other commands: Commands whose output is more
> amenable to being used by other commands.

I'll second this one. Having "list"s output being definable was a nice
start, even if the %s %s%s business is a bit funky. Just having it generate
a list of names would help, especially if some small, tight, file
reformatter was available. Even something not so small, if it was along
the lines of 'sed' or 'awk'. Hmmm... seems like a job for REXX...

I have a copy of what seems to be a PD version of 'ed'. In C. Perhaps it
would make a good adjunct, with a little fiddling...
-- 
Peter "Have you hugged your wolf today" da Silva      `-_-'
...texbell!sugar!peter, or peter@sugar.hackercorp.com  'U`