Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!ogicse!qiclab!onion!jeff From: jeff@onion.rain.com (Jeff Beadles) Newsgroups: comp.unix.questions Subject: Re: What does this sh script line do? Message-ID: <1991Jun13.041427.25609@onion.rain.com> Date: 13 Jun 91 04:14:27 GMT Article-I.D.: onion.1991Jun13.041427.25609 References: <1991Jun11.045504.26169@thunder.mcrcim.mcgill.edu> <2142@mitisft.Convergent.COM> Lines: 20 dold@mitisft.Convergent.COM (Clarence Dold) writes: >Isn't the correct syntax ":-" ? My shell likes it with or without the : >. ${NEWSCONFIG:-/usr/lib/news/bin/config} > ^ Depends on what you want. The variable is expanded as: If the NEWSCONFIG variable is set and non-null, use it, else use "/usr/..." Without the colon, take the above line and delete "and non-null," Note, that the ':' operator is not very portable. I've ran into a couple of systems that don't support it. By the way, the ':' is discussed in "tfm" under "Parameter Substution..." :-) -Jeff -- Jeff Beadles jeff@onion.rain.com