🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1537

Re: csh args

#1537
From: Paul John Falstad
Date: Fri, 19 Oct 1990 03:42
24 lines
1542 bytes
In article <4861@crystal1.UUCP> mostek@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@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.
Technical Details
Message-ID: <3448@idunno.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!njin!princeton!phoenix.Princeton.EDU!pfalstad
References: <4861@crystal1.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!njin!princeton!phoenix.Princeton.EDU!pfalstad
From: pfalstad@phoenix.Princeton.EDU (Paul John Falstad)
Newsgroups: comp.unix.shell
Subject: Re: csh args
Keywords: csh alias args
Message-ID: <3448@idunno.Princeton.EDU>
Date: 19 Oct 90 03:42:56 GMT
References: <4861@crystal1.UUCP>
Sender: news@idunno.Princeton.EDU
Distribution: comp
Organization: Princeton University, Princeton, New Jersey
Lines: 24