Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    but i can use echo "$foo"a then why braces in used? Commented Feb 13, 2013 at 8:18
  • 2
    @RahulPatil Then there is no difference. " is an illegal character in a variable name, so it terminates there. Commented Feb 13, 2013 at 8:23
  • @RahulPatil But, with the braces you can do a lot more! See also the link provided by manatwork in the comment to your question. Commented Feb 13, 2013 at 8:55
  • 3
    There's no ambiguity in the first statement - It's clearly the value of the fooa variable. Bash is not DWIM-compatible :) Commented Feb 13, 2013 at 9:17
  • 2
    @l0b0 - perhaps I should have said "ambiguous to humans", obviously the actual syntax is defined ;-) Commented Feb 13, 2013 at 9:23