Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.gentoo    |    Stupid OS you gotta compile EVERYTHING    |    17,684 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 15,951 of 17,684    |
|    Chris F.A. Johnson to Michael Mauch    |
|    Re: What does the colon minus operator d    |
|    02 Dec 07 12:34:44    |
   
   XPost: comp.os.linux.misc   
   From: cfajohnson@gmail.com   
      
   On 2007-12-02, Michael Mauch wrote:   
   > Mark Hobley wrote:   
   >   
   >> I am looking at a script written for the runscript shell. I have a line as   
   >> follows:   
   >>   
   >> if [[ ${RC_INTERACTIVE:-yes} == "yes" ]] ; then   
   >>   
   >> I would like to know what the :- (colon minus) operator that follows the   
   >> variable name does.   
   >   
   > Like in a normal (POSIX like) shell   
      
    It is true for all 'Bourne-esque' shells.   
      
   > - "info bash" says:   
   >   
   > ${PARAMETER:-WORD}'   
   > If PARAMETER is unset or null, the expansion of WORD is   
   > substituted. Otherwise, the value of PARAMETER is substituted.   
      
      
   --   
    Chris F.A. Johnson, author |
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca