Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!agate!shelby!rutgers!att!cbnewsh!twb From: twb@cbnewsh.ATT.COM (thomas.w.beattie) Newsgroups: comp.sys.att Subject: Re: $_ Keywords: ksh csh sh $_ Message-ID: <492@cbnewsh.ATT.COM> Date: 9 May 89 15:03:34 GMT References: <1083@adds.newyork.NCR.COM> Reply-To: twb@cbnewsh.ATT.COM (thomas.w.beattie) Organization: AT&T Bell Laboratories Lines: 25 In article <1083@adds.newyork.NCR.COM> tanya@adds.newyork.NCR.COM (Tanya Katz) writes: >In csh, the command & substitution are echoed before being executed, >so you can see the horrible things you are doing, even if you can't >quite stop them!! At least if you could see the the argument expanded >wrong, you can possibly undo the damage. But, alas there is no >expansion, and even when you call up a history the $_ appears as $_, and >you have to trace it back to the offending line. In ksh you can have filename generation and $-variables expanded. Since the expansion is done before entering the command you have a chance to catch a mistake before pressing . In EMACS mode: expands the current token, as does * (In versions 11/16/88 and newer only generates unique filenames, * generates all matching filenames; before 11/16/88 they were the same. Treatment of $-variables is the same for both in all versions). I routinely use these sequences to avoid typos and other mistakes. Check out = also. --- Tom Beattie att!hoqaa!twb t.w.beattie@att.com