wfh58@leah.Albany.Edu (William F. Hammond) (03/03/90)
In article <15600003@ux1.cso.uiuc.edu>, cs121jj@ux1.cso.uiuc.edu writes: [The cited article was in .tech; it belongs in comp.sys.amiga.] > but this does not work at all in ASH (the ARP shell): > > alias ls=dir | less > . . . > All I wanted to do was to send the output of dir to less so I can view it > easily. Is that too much to ask? It's certainly not too much too ask. (Of course, you need to supply your own concurrent piping device such as "PIP:" from W. Hawes' "ConMan".) The correct syntax would be alias ls dir \| less where "\" is the ARP escape character (an environmental variable). By the way, not all file readers handle concurrent piping properly; one that does work properly is "efr" on Fish Disk 254. Also by the way, if you write many aliases you might want to have one called "als" that shows the current value of an alias string. For that I would suggest: alias eq echo "\x22" noline alias als alias \| search STDIN \$(eq)\t[]=\$(eq) NONUM where the commands being used are assumed to be ARP. Note that although aliasing is not recursive, you can use an alias in a subshell and therefore also in an alias that invokes a subshell when called. (But you cannot make one alias a part of another.) Then als ls will show the current value of the alias "ls". By the way, input or output diversion in an alias is problematical. "\>" is not parallel to "\|". But you can work around it with ARexx(tm). ---------------------------------------------------------------------- William F. Hammond Dept. of Mathematics & Statistics 518-442-4625 SUNYA, Albany, NY 12222 wfh58@leah.albany.edu wfh58@albnyvms.bitnet ----------------------------------------------------------------------