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,949 of 17,684    |
|    Michael Mauch to Mark Hobley    |
|    Re: Why are variable names surrounded by    |
|    02 Dec 07 14:37:25    |
   
   XPost: comp.os.linux.misc   
   From: michael.mauch@gmx.de   
      
   Mark Hobley wrote:   
      
   > I am looking at some Gentoo startup scripts. I notice that when a variable   
   > name is referenced, it is surrounded by squiggly brackets (braces). I tried   
   > some test code without the brackets, and it appeared to function ok. I was   
   > wondering what purpose the brackets serve.   
      
   Try   
      
    a="some text"   
    echo "${a}more text"   
      
   If you omit the braces here, the shell thinks the variable name is   
   ${amore}.   
      
   But most of the time these braces are just cosmetic (so it's easier to   
   read, perhaps).   
      
   The runscript syntax is just the Bash syntax (/sbin/runscript runs   
   bash), so you can get more info in "info bash" and any bash tutorial you   
   can find on the net.   
      
   Regards...   
    Michael   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca