Follow

LT: i can't believe anyone thinks bash is Good

@codeHaiku hey I meant @cac should change my mind, not everyone on the fedi!

@Wolf480pl tbh just look at the syntax for an if statement as a microcosm of bash. It seems like arbitrary spaces/newlines, combined with arcane flags for different conditions, which just means everything is unintuitive, and if I go one day without using it I'll need to go google where the spaces go and which flags do what

@cac umm... no?

if <command>; then <commands...>; else <commands...>; fi

simple as that.

I guess your problem is more with the syntax of the `test` command. (a.k.a. `[`).

@cac Anyway, what I love about bash is its use for ad-hoc oneliners.

Like,
for i in `seq 10`; do ssh "worker$i" reboot; done

or piping something to awk to more awk to xargs.

This lets you quickly automate things which would you wouldn't normally automate, because automating them in a regular programming language would take more time than doing it by hand.

@cac Also, bash is pretty great for rapid prototyping of data analysis and data processing.

@cac pro fedi tip: reply to boosted post, remove @ tags, put "LB: your comment" so people know which boost you mean
I heard it works
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!