Path: utzoo!attcan!uunet!husc6!mailrus!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.unix.wizards Subject: Re: Ksh use (was Re: Should ``csh'' be part of ...) Message-ID: <7813@ncoast.UUCP> Date: 26 May 88 00:13:41 GMT References: <2599@usceast.UUCP> <2601@usceast.UUCP> <4095@mtgzz.UUCP> <2199@quacky.mips.COM> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 43 As quoted from <2199@quacky.mips.COM> by dce@mips.COM (David Elliott): +--------------- | 1. It's really nice to be able to say | | rcsdiff -r1.{2,4} foo.c | | Does ksh have anything like {}? (In case you don't know, "-r1.{2,4}" | expands to "-r1.2 -r1.4".) +--------------- Not as far as I've been able to tell. I agree that it's useful; especially since it can be used on non-filenames and it doesn't sort its expansion. +--------------- | % foo bar | ... | % ^oo^ob^ # change first foo to foob | fob bar +--------------- k$ r oo=ob fob bar +--------------- | % mv foo.c foo.c.old | % !!:gs/foo/bar/ # change all foo to bar | mv bar.c bar.c.old +--------------- This one's harder: no global substitution mechanism. You can use k$ r foo=bar foo=bar or you can use emacs or vi mode and edit the command line. This didn't bother me too much, as we have the buggy csh that's commonly distributed by System III/V VARs... since I have histchars=^@ so I can send UUCP mail without sprouting backslashes every which way, global search-and-replace only works right if I add :p the first time and actually run it the second time -- otherwise, it ignores the 'g'. (Strange.) -- Brandon S. Allbery, moderator of comp.sources.misc {well!hoptoad,uunet!marque,cbosgd,sun!mandrill}!ncoast!allbery Delphi: ALLBERY MCI Mail: BALLBERY