Nice presentation.
Regarding the math module, I favor the builtin
echo $(( 100 + 200 ))
over the external expr command.
Doing math in expr is a relict from the past: the ancient Bourne shell did not have the builtin math.
You need an echo command to display it, but it turns out to be an advantage if you do not want to display it, for example
sum=$(( 100 + 200 ))
Likewise, I favor the builtin
command -v htop
over the external which command (that actually is a c-shell builtin).
Well, he starts with the which command, but then in the script uses the command command.
So it's okay.
Last edited by MadeInGermany; 12-17-2022 at 07:10 AM.
|