Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!nic.MR.NET!xanth!mcnc!duke!romeo!gm From: gm@romeo.cs.duke.edu (Greg McGary) Newsgroups: comp.sources.d Subject: Re: Bourne Again Shell? Message-ID: <13559@duke.cs.duke.edu> Date: 16 Feb 89 13:49:25 GMT References: <26563@teknowledge-vaxc.ARPA> <46100006@hcx3> <1491@vicom.COM> Sender: news@duke.cs.duke.edu Reply-To: gm@romeo.UUCP (Greg McGary) Organization: Duke University CS Dept.; Durham, NC Lines: 34 In article <1491@vicom.COM> lmb@vicom.COM (Larry Blair) writes: >In article <46100006@hcx3> shirono@hcx3.SSD.HARRIS.COM writes: >= ``I want to apply command `foo' to the last word of the previous >= command.'' >= >= foo !$ > >foo $_ These aren't the same. The ksh `$_' is the final argument *after* globbing, while the csh `$!' is the final argument *before* globbing. e.g., a directory contains the following: foo bar foobar In csh: % echo * foo bar foobar % echo !$ echo * foo bar foobar In ksh: $ echo * foo bar foobar $ echo $_ foobar -- Greg McGary -- 4201 University Drive #102, Durham, NC 27707 voice: (919) 490-6037 -- {decvax,hplabs,seismo,mcnc}!duke!gm data: (919) 493-5953 -- gm@cs.duke.edu