Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!ukma!psuvm.bitnet!cunyvm!nyser!cmx!jerryp From: jerryp@cmx.npac.syr.edu (Jerry Peek) Newsgroups: comp.unix.wizards Subject: Re: Ksh use (was Re: Should ``csh'' be part of ...) Keywords: csh==Berkeley shell, should it be in System V or not? Message-ID: <517@cmx.npac.syr.edu> Date: 4 Jun 88 17:21:08 GMT References: <2599@usceast.UUCP> <2601@usceast.UUCP> <4095@mtgzz.UUCP> <2199@quacky.mips.COM> Reply-To: jerryp@cmx.npac.syr.edu (Jerry Peek) Organization: Northeast Parallel Architectures Center, Syracuse NY Lines: 32 In article <2199@quacky.mips.COM> dce@mips.COM (David Elliott) writes: > 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".) Back when I was using a system that had ksh, I wrote an alias called qcsh. It passed a commandline to csh and ran it. For instance, I'd type: $ qcsh rcsdiff -r1.{2,4} foo.c To set it up, I put this alias in my .profile: alias qcsh=". ~/ksh/qcsh" And this file in ~/ksh/qcsh: --------- CUT HERE FOR qcsh FILE ---------------- # USING "csh -fc $*" WON'T EXPAND THINGS LIKE a{b,c,d}... SO, USE TEMP FILE: echo "$@" > /tmp/q$$ csh -f /tmp/q$$ rm -f /tmp/q$$ set -- --------- END OF qcsh FILE --------------------- Quick and dirty, but it worked just fine. --Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY 13244-1260 jerryp@cmx.npac.syr.edu +1 315 423-4120