What
For example, how could it know whether
cat $foo
should becat "$foo"
, or whether the script actually relies on word splitting? It's possible that$foo
intentionally contains multiple paths.
Last time I used ShellCheck (yesterday funnily enough) I had written ports+=($(get_elixir_ports))
to split the input since get_elixir_ports
returns a string of space separated ports. It worked exactly as intended, but ShellCheck still recommended to make the splitting explicit rather than implicit.
The ShellCheck docs recommended
IFS=" " read -r -a elixir_ports <<< "(get_elixir_ports)"
ports+=("${elixir_ports[@]}")
Liverpool with CL Real Madrid level of robbery this game lol
If you're going to write scripts that requires installing software, might as well use something like python though? Most Linux distros ship also ship with python installed
Wow. Out of the blue
Not much of a surprise
Quite the error by the keeper, honestly expected a much closer result
I'm not anti bash or fish, I've written in both just this week, but if we're talking about readability/syntax as this post is about, and you want an alternative to bash, I'd say python is a more natural alternative. Fish syntax is still fairly ugly compared to most programming languages in my opinion.
Different strokes for different folks I suppose.