this post was submitted on 26 Aug 2023
101 points (98.1% liked)

linuxmemes

20880 readers
2 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 1 year ago (1 children)

First one has the pitfall of a space at the end of the variable still causing it to fail.

[–] [email protected] 1 points 1 year ago (1 children)

Would a space at the end of the variable be ignored in the second one, though?

[–] [email protected] 1 points 1 year ago

It would still be considered a single variable because the entire string is quoted. The first scenario would have split it into 2 variables.