Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!apple!oliveb!mipos3!omepd!merlyn From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.unix.wizards Subject: Re: csh problem involving nested ifs? Summary: /bin/sh please Keywords: just a minor flame... Message-ID: <4660@omepd.UUCP> Date: 17 Jul 89 13:42:03 GMT References: <20243@adm.BRL.MIL> <5016@ficc.uu.net> <3171@quick.COM> Sender: news@omepd.UUCP Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Followup-To: /dev/null Organization: Stonehenge; netaccess via Intel, Hillsboro, Oregon, USA Lines: 39 In-reply-to: srg@quick.COM (Spencer Garrett) In article <3171@quick.COM>, srg@quick (Spencer Garrett) writes: | In article <5016@ficc.uu.net>, peter@ficc.uu.net (Peter da Silva) writes: | | -> generate_a_list_of_file_names | | -> while read FNAME | -> do | -> do_something_with FNAME | -> done | -> | -> is second nature. And it's impossible in csh without massive inconvenience. | -> By comparison, having TEST and EXPR builtin is a minor optimisation. | | What are you talking about? It's easy and much more natural under csh. | | foreach fname (`generate_a_list_of_file_names`) | do_something_with_fname | end Unless (and there are far far far too many "unless"-es with CSH...) generate_list_of_file_names returns more than 5120 characters, *or* the resulting list can't be globbed properly (I just got bit on /bin/*... try it... it bites the big one on "/bin/[") *or* some other combination of events that I'll probably run across tomorrow... Gaaaaccckkk! Gimme /bin/sh any day. True parsing. No nonsense. Of course, as soon as /bin/ksh becomes *the* standard, I'll like it much better. Until then, I'm stuck with csh for my top level shell because of command history and job control, but all my scripts (well, non-Perl scripts :-) are /bin/sh. Just an old-time UNIX hacker, -- /== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\ | on contract to Intel, Hillsboro, Oregon, USA | | merlyn@iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn | \== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/