Bourne-shell incompatibilities

Dan_Jacobson at ATT.COM Dan_Jacobson at ATT.COM
Mon Jan 7 04:41:57 AEST 1991


>>>>> On 5 Jan 91 14:35:27 GMT, jc at minya.UUCP (John Chambers) said:

John> 	${x-foo}
John> versus:
John> 	${x:-foo}

John> Often only one of these is accepted by any particular /bin/sh, and the
John> other is a syntax error.

My understanding is that the first should always work, and the second
should work in newer /bin/sh's with this added bonus feature [BSD 4.3
/bin/sh doesn't accept it, like you mentioned].
-- 
Dan_Jacobson at ATT.COM  Naperville IL USA  +1 708-979-6364



More information about the Comp.unix.shell mailing list