UndercoverUlrikHD

joined 2 years ago
MODERATOR OF
[–] [email protected] 1 points 2 weeks ago (1 children)

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.

[–] [email protected] 4 points 2 weeks ago

For example, how could it know whether cat $foo should be cat "$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[@]}")
[–] [email protected] 7 points 2 weeks ago

Liverpool with CL Real Madrid level of robbery this game lol

[–] [email protected] 10 points 2 weeks ago (3 children)

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

[–] [email protected] 4 points 2 weeks ago* (last edited 2 weeks ago)

Wow. Out of the blue

[–] [email protected] 2 points 2 weeks ago

Not much of a surprise

[–] [email protected] 2 points 2 weeks ago

Quite the error by the keeper, honestly expected a much closer result

view more: ‹ prev next ›