csh args

Paul John Falstad pfalstad at phoenix.Princeton.EDU
Fri Oct 19 13:42:56 AEST 1990


In article <4861 at crystal1.UUCP> mostek at motcid.UUCP (Frank B. Mostek) writes:
>How does one pass several args (more than 2), other than the !^, !*, !$
>mechanisms, to aliases in csh?  I have read the man page, read the UNIX
>C Shell Field Guide, and "played around" for about an hour.

I'm not exactly sure what you want to do.   Do you know about the !:n syntax?

% alias first echo \!:1
% alias second echo \!:2
% alias swap echo \!:2 \!:1
% second a b c
b

If you have something specific you want, it's probably possible.

The only way to pass arguments is through this pseudo-history-mechanism
thing (unless you want all the arguments intact, of course).  Very
kludgy.  It's too bad csh doesn't have shell functions.

--
Paul Falstad, pfalstad at phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD
And Dinsdale said, "You've been a naughty boy, Clement," and splits me nostrils
open, and saws me leg off, and pulls me liver out.  And I said, "My name's not
Clement."  And then he loses his temper.  And he nails me head to the floor.



More information about the Comp.unix.shell mailing list