home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!seas.smu.edu!convex!rdavis
- From: rdavis@convex.com (Ray Davis)
- Subject: Re: How to do csh-like alias in ksh?
- Message-ID: <rdavis.725565960@connie.de.convex.com>
- Sender: usenet@convex.com (news access account)
- Nntp-Posting-Host: connie.de.convex.com
- Organization: CONVEX Computer Corporation, Richardson, Tx., USA
- References: <1992Dec24.022550.8880@microsoft.com>
- Distribution: pnw
- Date: Mon, 28 Dec 1992 18:06:00 GMT
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 18
-
- russsan@microsoft.com (Russell Sanchez) writes:
-
- >Is there any way to do a csh-like 'bang' in ksh aliases? I'm basically
- >trying to do alias substitution (including parser metasyntax if possible).
- >For example, I want to convert the csh alias...
- >alias ff 'find . -name /!* -print'
- >...to ksh, something like...
- >alias ff='find . -name ???? -print'
- >...but what is the ????. ksh doesn't seem to parse commands like csh.
-
- Not possible with aliases, but with functions:
-
- function ff { find . -name $* -print; }
- or: ff() { find . -name $* -print; }
-
- if you prefer.
-
- Ray
-