Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!pdn!palan!ckctpa!crash From: crash@ckctpa.UUCP (Frank J. Edwards) Newsgroups: comp.unix.amiga Subject: Re: SVR4 /bin/sh BUG Message-ID: <1991Jun15.045239.196@ckctpa.UUCP> Date: 15 Jun 91 04:52:39 GMT References: <1991Jun05.054111.27541@digibd.com> <377@audfax.audiofax.com> <109310@becker.UUCP> Organization: Edwards & Edwards Consulting Lines: 49 In article <109310@becker.UUCP> bdb@becker.UUCP (Bruce D. Becker) writes: >In article <377@audfax.audiofax.com> arnold@audiofax.com (Arnold Robbins) writes: >|Amen. There's no reason to ship *three* stupid shells. ksh should have >|been installed as /bin/sh and that's it. > > Agreed - so how about it Amiga unix guys, > we all know it works; will you do this for > the 2.0 release? Watch it, there... There are some pretty major differences in the way sh and ksh handle certain operations that can cause seemingly simple shell scripts to break. For example, #!/bin/ksh # add up everything in column two x=0 while read field1 field2 junk do x=`expr $x + $field2` done echo $x ... works under ksh but not sh -- why? (I'll let you stew over this one for awhile before giving an answer >-} >-} Some things are more obvious like "^" not being a pipe character to ksh, or the semantics of function execution and/or traps within functions. And a compatriot of mine just upgraded his Sequent (alright, his company's Sequent, but you know how administrators feel about _their_ machine ;-) and his scripts broke because the vendor removed the built-in alias for "echo" so his scripts were using /bin/echo which operates differently! >-- > ,u, Bruce Becker Toronto, Ontario >a /i/ Internet: bdb@becker.UUCP, bruce@gpu.utcs.toronto.edu > `\o\-e UUCP: ...!utai!mnetor!becker!bdb > _< /_ "Ferget yer humanity, do the poot" - devo When I made ksh a hard link to /bin/sh it broke the scripts in the ~uucp cleanup routines. Try and figure out why "cd" and "pwd" would cause the scripts to break... -- Frank J. Edwards | "I did make up my own mind -- there 2677 Arjay Court | simply WASN'T ANY OTHER choice!" Palm Harbor, FL 34684-4504 | -- Me Phone (813) 786-3675 (voice) | Only Amiga Makes It Possible...