|
|
|
|
|
by js2
636 days ago
|
|
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. |
|