News for hackers. Stuff that matters.
Re:Show HN: sol – A de-minifier for shell programs by js2 on Wednesday September 18, 2024 @12:20PM (#41581875)
If you end with a pipe, you don't need the backslash before the newline. It's implicit.

https://unix.stackexchange.com/questions/253518/where-are-ba...

When writing bash, if I have a command with many switches, I use an array to avoid backslashes and make the intent clearer:

  curl_cmd=(
    curl
    --silent
    --fail
    --output "$output_file"
    "$url"
  )
  "${curl_cmd[@]}"
I also insist on long-form options in shell scripts since they are much more self-documenting as compared to single-letter options.

There are no comments on this comment yet.