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.

Required fields*

4
  • 18
    $18 is understood as ${1}8. I guess the lexer is simpler like this. Commented Dec 12, 2021 at 19:40
  • 26
    technically, your opening statement is misleading, you say there's only nine positional parameters, yet you show that there is no limit of 9 Commented Dec 12, 2021 at 21:31
  • 8
    I would be very surprised if the story was anything other than that it was done like that in the first implementation and it stuck due to backward compatibility. Commented Dec 12, 2021 at 21:58
  • 2
    I find it's helpful if you view ${var} as the "official" way to expand shell variables, and think of dropping the curly braces as a shortcut which is enabled in some, but not all, cases. Commented Dec 14, 2021 at 13:22