Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2002 12:50:03 -0700 (PDT)
From:      Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/39198: sh aborts on variables with periods
Message-ID:  <200206121950.g5CJo3603336@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR bin/39198; it has been noted by GNATS.

From: Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
To: Joe Kelsey <joek@mail.flyingcroc.net>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/39198: sh aborts on variables with periods
Date: Wed, 12 Jun 2002 21:40:49 +0200

 Joe Kelsey wrote:
 
 > 	/bin/sh does not gracefully accept variables with periods.
 
 Neither does ksh88, the direct predecessor to ksh93, which is used
 as "sh" and "ksh" on most Unix systems, so you have to modify your
 startup script in any case.  It answers with almost exactly the
 same message as fbsd /bin/sh.
 
 > 	Either /bin/sh has to allow parameters to contain periods or it
 > 	has to provide a reliable method of detecting /bin/sh versus
 > 	ksh.
 
 Try to check for RANDOM, which does not exist on sh.  It probably
 exists on bash (haven't checked) but you can check that through
 the existance of BASH_VERSION.  Similarly probably for zsh.
 Then try to check for KSH_VERSION to draw the line between ksh and
 pdksh.  Then you might do a strings ${0##-}|grep "@(#)Version"
 (or use what(1)) and check for "M 1993" which is a bit wasteful but
 if you really want to know then that'll work.  Then you probably want
 to differentiate further since some earlier version of the '93 edition
 did not support everything that is described in the Kornshell book
 (if you're really pedantic.)
 
 --mkb
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206121950.g5CJo3603336>