Closed sumbach closed 8 years ago
Right, it's a good practice, but these brings difficulty to understand, for beginners. Actually, I didn't understand why I should enclose variables in quotes too.
If we are gonna to add these quotes, we should add explanation why we enclose variables in quotes.
Agree with @denysdovhan. But on the other hand this is a living document so I don't think we should be expecting anyone to write the explanations too. If @sumbach is up for that then that's great, but in the mean time, we could merge this and add it to the roadmap to things we must explain in more detail in the future.
What do you think?
@bucaran, I think we should write explanation before.
I can try to take a crack at this later this week.
I'd like to propose moving the "Arrays" section below the "Shell expansions" section so we can talk about arrays and expansions after we've mentioned single- and double-quotes.
I'd like to propose moving the "Arrays" section below the "Shell expansions" section
@sumbach Okay, it makes sense.
@denysdovhan @bucaran I took at crack at explaining quoting, word splitting, and array expansion in more detail. Feedback welcome...
LGTM. Please consider my coments.
I've updated the branch in response to your feedback. Thanks again for working with me @denysdovhan :smile:
Published as 2.0.0
!
Thank you! You did a great work!
Thanks @denysdovhan! This is an awesome resource--thank you for getting this started :beers:
U R Welcome! :smiley:
It's really hard to get quoting right in bash scripts. While the quotes may not be absolutely necessary in these examples, it's better to have them in place to encourage good behavior (and help anyone who copies, pastes, and modifies these examples).