Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!tut.cis.ohio-state.edu!bloom-beacon!apple!vsi1!lmb From: lmb@vicom.COM (Larry Blair) Newsgroups: comp.sources.d Subject: Re: Bourne Again Shell? Message-ID: <1491@vicom.COM> Date: 15 Feb 89 20:55:19 GMT References: <26563@teknowledge-vaxc.ARPA> <46100006@hcx3> Reply-To: lmb@vicom.COM (Larry Blair) Organization: VICOM Systems Inc., San Jose, CA Lines: 25 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 $_ = ``I want everything exactly the same, but change the string `foo' = for `bar' in the last word.'' = !:0- !$:gs/foo/bar/ This is one on the incredibly cryptic things about csh that I enjoy with ksh. Type `$' and move back to the word to change. It may be a couple more keystrokes, but it's actually faster because I don't have to think about it. Btw, the most common use of "gs", "!cmd:gs/old/new/" is actually easier ksh: "r old=new cmd". I'm not saying that there aren't things lacking in ksh; I miss "!! newstuff" and "!*" would be really useful. It's just nice to only have to deal with one editor syntax. I don't know of a single person who has used ksh and gone back to csh. I hope that the GNU shell is a superset of ksh and not some ksh/csh compromise. -- Larry Blair ames!vsi1!lmb lmb@vicom.com