Date: Wed, 10 May 1995 09:21:52 +0200 (MET DST) From: Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de> To: wsantee@wsantee.oz.net (Wes Santee) Cc: freebsd-ports@FreeBSD.org Subject: Re: pdksh errors - Solved! Message-ID: <199505100721.JAA23932@ghpc6.ihf.rwth-aachen.de> In-Reply-To: <199505100613.XAA06332@wsantee.oz.net> from "Wes Santee" at May 9, 95 09:34:00 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Wes Santee wrote: > > Well, I dunno if anybody has any interest in this, but I solved my > earlier problem of pdksh crapping out whenever I tried to run > /usr/bin/clear. The error was in the global /etc/ksh.kshrc file. > Here is the culprit: > > HOSTNAME=${HOSTNAME:-`uname -n` > HOST=${HOSTNAME%%.*} <--- error Now that you're saying it... > Incidentally, you may recall that the original error was: > > /usr/bin/clear: 21: syntax error: bad substitution > > Well, I'll leave it to the reader to figure out what line number the > offending statement was in the /etc/ksh.kshrc file. :) pdksh sets ${ENV} to /etc/ksh.kshrc. /bin/sh reads ${ENV}. Obviously a POSIX thing. /bin/sh doesn't know anything about the %% substitution so it gives an error message when it tries to execute /usr/bin/clear. You will notice that /etc/profile (the one from the ksh distribution) contains a test for the interpreter (something like `if [ $RANDOM != $RANDOM ] we're ksh else a bourne shell'; sorry, memory's the first thing to go). I think I guarded /etc/ksh.kshrc in a similar manner. Maybe I should add my changes to the port and install the dot-files somewhere (/etc? /usr/share/skel?). tg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505100721.JAA23932>