this post was submitted on 15 Jun 2024
13 points (93.3% liked)

Shell Scripting

1359 readers
1 users here now

From Ash, Bash and Csh to Xonsh, Ysh and Zsh; all shell languages are welcome here!

Rules:
  1. Follow Lemmy rules!
  2. Posts must relate to shell scripting. (See bottom of sidebar for more information.)
  3. Only make helpful replies to questions. This is not the place for low effort joke answers.
  4. No discussion about piracy or hacking.
  5. If you find a solution to your problem by other means, please take your time to write down the steps you used to solve your problem in the original post. You can potentially help others having the same problem!
  6. These rules will change as the community grows.

Keep posts about shell scripting! Here are some guidelines to help:


In general, if your submission text is primarily shell code, then it is welcome here!

founded 1 year ago
MODERATORS
 

The document itself is paywalled like all the POSIX specifications, so here are some highlights courtesy of some comments at HackerNews, especially from a-french-anon.

top 1 comments
sorted by: hot top controversial new old
[–] gamma 3 points 5 months ago

IMO the NUL-delimited options are by far the biggest win for shell scripting. $' ' will be the most commonly used addition, but "$(printf '...')" was always an option before. You don't really have an alternative read -d ''.