What does this sh script line do?
der Mouse
mouse at thunder.mcrcim.mcgill.edu
Tue Jun 11 14:55:04 AEST 1991
In article <1991Jun06.172119.19494 at ka3ovk>, albers at ka3ovk (Jon Albers) writes:
[trying to install C news on a system with an oooold sh]
> . ${NEWSCONFIG-/usr/lib/news/bin/config}
> It blows up on this line with the error 'Bad substitution', however,
> under SCO UNIX, it work just fine. What is it supposed to be doing?
$NEWSCONFIG unless $NEWSCONFIG is not set, in which case
/usr/lib/news/bin/config.
Given the usage, you could do something like
if [ "x$NEWSCONFIG" = "x" ]; then
NEWSCONFIG=/usr/lib/news/bin/config
fi
. $NEWSCONFIG
(This is not a general replacement for the ${name-string} syntax; it's
not supposed to be. It's supposed to be something that *might* be good
enough to get C news running for the original poster.)
der Mouse
old: mcgill-vision!mouse
new: mouse at larry.mcrcim.mcgill.edu
More information about the Comp.unix.questions
mailing list