the idea of infix math within a prefix command language is just gross to me.
yes, and there's also expr(1).
trinity No [[ ]]. I don't know what this is but so far have never needed it.
An extremely common and abused bashism. A random [[
encounter is usually the result of copycat and bad habit. It avoids having to put variable in quotes in evaluating conditions. It support pattern matching and has an interesting =~
regex match operator though. Mostly used outside of these useful scopes, however. The other very common cancer bashism is process substitution
No echo(1), only printf(1), because echo(1) changes so much between implementations.
I think everybody outside of Linux agrees on the fact echo -e
is a useless entanglement of different programs with different use cases.
I prefer && and || to control flow though it's personal choice.
I do to, and as a matter of fact I really like your scripting! ;).
if [-operator ]
and test
are somewhat more readable (for other users), but &&
and ||
really reduce the amount of clutter by orders of magnitude. Another thing I love much is subshells (but I know, avoid spawning additional processes unless needed).