Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Alias command Message-ID: <15845@bloom-beacon.MIT.EDU> Date: 13 Nov 89 05:48:29 GMT References: <29537@iuvax.cs.indiana.edu> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 30 In article <29537@iuvax.cs.indiana.edu> bwildasi@silver.bacs.indiana.edu (Ben Wildasin) writes: >I would like to modify the rm command so that it first deletes the file, and >then copies it to my nfs directory. In other words, I would like to know >how I can create an alias that can be passed arguments. RTFM. You can use history substitution in an alias. From the csh(1) man page: Note that the mechanism allows aliases to introduce parser metasyntax. Thus we can `alias print 'pr \!* | lpr'' to make a command which pr's its arguments to the line printer. See the man page to find out how to do other, more specific substitutions. Also, I fail to see how an alias is first going to delete a file, and *then* going to copy it to your NFS directory. Finally, your second sentence (about arguments to aliases) does not follow directly from the first, and isn't really a restatement "in other words" of the first question. The two are related tenuously at best.... Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710