Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions Subject: Re: What does this sh script line do? Message-ID: <1991Jun11.045504.26169@thunder.mcrcim.mcgill.edu> Date: 11 Jun 91 04:55:04 GMT References: <1991Jun06.172119.19494@ka3ovk> Organization: McGill Research Centre for Intelligent Machines Lines: 28 In article <1991Jun06.172119.19494@ka3ovk>, albers@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@larry.mcrcim.mcgill.edu