From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f7f68e18cfb8d31b X-Google-Attributes: gidfa528,public X-Google-Thread: 1012a6,f7f68e18cfb8d31b X-Google-Attributes: gid1012a6,public X-Google-ArrivalTime: 2003-12-22 13:26:47 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-proxy.abbnm.com!newsboy.eng.abbnm.com!not-for-mail From: peter@abbnm.com (Peter da Silva) Newsgroups: comp.unix.shell,comp.unix.tru64 Subject: Re: Unexpected result from grep Date: Mon, 22 Dec 2003 21:14:55 +0000 (UTC) Organization: ABB Inc., Network Management Division Message-ID: References: <0z_Eb.170955$Eq1.160079@twister.rdc-kc.rr.com> NNTP-Posting-Host: grendel.eng.abbnm.com X-Trace: jeeves.eng.abbnm.com 1072127695 43006 198.178.0.150 (22 Dec 2003 21:14:55 GMT) X-Complaints-To: usenet@jeeves.eng.abbnm.com NNTP-Posting-Date: Mon, 22 Dec 2003 21:14:55 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: peter@abbnm.com (Peter da Silva) Xref: archiver1.google.com comp.unix.shell:3748 comp.unix.tru64:11050 In article <0z_Eb.170955$Eq1.160079@twister.rdc-kc.rr.com>, Dan Mercer wrote: > Portability using a minimal sh functionality pushes the burden of portability > from the shell to the OS. That's one way of looking at it, I suppose. Really, though, that viewpoint is confusing correlation and causation. Just because you're running ksh or bash or zsh doesn't mean you're running a new awk or that perl is installed. Writing a script in a less portable way, from the point of view of the shell, doesn't provide any guarantee that all the program invocations in the script are going to work. And writing it in a more portable way doesn't change the version of awk already installed on the target system into gawk. All you can say is that a system with a newer shell installed is more likely to have newer versions of other programs, but if other parts of the code are non-portable then all you're doing is hiding any deeper problems and make it harder to isolate them when they do show up. And in the meantime you're adding to system complexity by forcing people to install multiple different shells. As for using the "#!/bin/ksh" to discourage the use of older shells, you can get the same results by putting that line there without actually using a single ksh extension. :) > It's too bad the POSIX shell group did such a poor job - too much > infighting from people with vested interests. Personally, I would > have been perfectly happy had they just said : "We're going to use > zsh - get over it." If they had done that then they would have condemned the POSIX shell to complete instead of marginal irrelevance, since they would have been even more widely ignored than they are now. -rwxr-xr-x 2 bin bin 131072 Apr 12 1999 /usr/bin/sh text data bss dec hex 114688 16384 4752 135824 21290 -rwxr-xr-x 2 bin bin 270336 Apr 12 1999 /usr/bin/ksh text data bss dec hex 229376 40960 17968 288304 46630 -rwxr-xr-x 1 root system 917504 Nov 23 1999 /usr/local/bin/zsh text data bss dec hex 598016 73728 48896 720640 aff00 -- I've seen things you people can't imagine. Chimneysweeps on fire over the roofs of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All these things will be lost in time, like chalk-paintings in the rain. `-_-' Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`