dylanaraps / pure-bash-bible

📖 A collection of pure bash alternatives to external processes.
MIT License
36.41k stars 3.27k forks source link

Please add a note that you can't use '-' in variable names #115

Open MattJaccino opened 3 years ago

MattJaccino commented 3 years ago

Spent a crazy long time debugging a gitlab script where I tried to assign "exit-code=$?" and had no idea why bash wasn't accepting it. A buddy sent me this repo as a joke, and I noticed it didn't mention this in the VARIABLES section. Definitely would confuse new users since hyphens are allowed in command names. Thank you.

terminalforlife commented 2 years ago

Good idea. Valid names are, in REGEX: ^(_|[^[:digit:]][[:alnum:]_]+)$