Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!terminus!rolls!mtuxo!mtgzz!avr From: avr@mtgzz.UUCP (XMRP50000[jcm]-a.v.reed) Newsgroups: comp.unix.wizards Subject: Re: Should ``csh'' be part of the System V distribution? Summary: With ksh, just do it as you would in your editor Keywords: csh==Berkeley shell, should it be in System V or not? Message-ID: <4097@mtgzz.UUCP> Date: 16 May 88 17:35:43 GMT References: <2599@usceast.UUCP> <2601@usceast.UUCP> <77@denali.stanford.edu> Organization: AT&T, Middletown NJ Lines: 17 In article <77@denali.stanford.edu>, karish@denali.stanford.edu (karish) writes: > I'm trying out ksh now, after four years of using csh exclusively > (interactively). The transition was easy. I don't feel anywhere near > as restricted as I do when I use sh interactively. The only thing I > miss is the '!$' construct; I suspect that there's a way to do this > under ksh, but I haven't found it yet. In ksh, the last argument of the previous line is "$_". To get the entire previous line, use commands appropriate to your editing mode. I use vi mode, so to get the previous line I type "-": to escape into command mode, and - to get the previous line. You can also use the search capabilities of your editor, eg in vi mode, /cpio gets you the last command containing the regular expression "cpio". Much more general than anything you can do in csh, and you don't even need to learn a set of csh-specific editing commands! Adam Reed (mtgzz!avr)