Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!odin!chet From: chet@odin.INS.CWRU.Edu (Chet Ramey) Newsgroups: comp.unix.questions Subject: Re: What does this sh script line do? Message-ID: <1991Jun12.200958.19849@usenet.ins.cwru.edu> Date: 12 Jun 91 20:09:58 GMT References: <1991Jun11.045504.26169@thunder.mcrcim.mcgill.edu> <2142@mitisft.Convergent.COM> Sender: news@usenet.ins.cwru.edu Reply-To: chet@po.CWRU.Edu Organization: Yoyodyne Propulsion Systems, Inc. Lines: 17 Nntp-Posting-Host: odin.ins.cwru.edu In article <2142@mitisft.Convergent.COM> dold@mitisft.Convergent.COM (Clarence Dold) writes: >> . ${NEWSCONFIG-/usr/lib/news/bin/config} >Isn't the correct syntax ":-" ? My shell likes it with or without the : >. ${NEWSCONFIG:-/usr/lib/news/bin/config} No, not necessarily. The `-' causes sh to substitute the RHS if the LHS is unset. The `:-' causes substitution if the LHS is unset or null. Chet -- ``You shoot John Sununu. Twice.'' Chet Ramey Internet: chet@po.CWRU.Edu Case Western Reserve University NeXT Mail: chet@macbeth.INS.CWRU.Edu