SVR4 /bin/sh BUG

Frank J. Edwards crash at ckctpa.UUCP
Sat Jun 15 14:52:39 AEST 1991


In article <109310 at becker.UUCP> bdb at becker.UUCP (Bruce D. Becker) writes:
>In article <377 at audfax.audiofax.com> arnold at 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 at becker.UUCP, bruce at 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...



More information about the Comp.unix.amiga mailing list