this post was submitted on 21 Nov 2023
237 points (80.5% liked)

linuxmemes

20880 readers
6 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
 

Edit: Enough money as in buying a PC supporting windows 11

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

no need to quote echo args :P

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

why not? it is clearer to read, and being more explicit when writing scripts can be safer, maybe not in this case, but if you echoed a variable without quotes, it could possibly expand as a glob

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

maybe not in this case, but we're talking about this case. Quoting is needed when it's needed, otherwise, well, is not needed. Rest assured zealotries tend to disappear the more time you're exposed to this stuff ;) but in the meanwhile prepare yourself for some PR rejections should you ever work with me hahaha cheers

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

I mean it's good practice generally just in case, even when it's not needed it makes it more maintainable

I usually go with YAGNI but shell quoting can get to be a pain so I try to do it right in scripts or aliases

But for a single one-off invocation lol definitely not quoting echo args