General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Winnetou17
DistroTube
comments
Comments by "Winnetou17" (@Winnetou17) on "The Bash \"test\" Command Tutorial" video.
It's interesting that in all programming 0 means false and non 0 means true, but in the exit codes it's the opposite, and bash knows to do that, to treat a 0 exit code a true value. Neat showing. Basically you'll never use it directly in the CLI (other than maybe testing if you wrote it correctly), but it's one of the foundations for effective, useful scripting. Basically all install scripts use this to check files, directories and permissions, to make sure they're doing the things correctly.
5
Isn't that overkill to do it in bash ? Seems way to complicated for that, to me.
4
@SFDestiny I think it is. Or that they have the same "source".
2
@shallex5744 Yup, it does. And also, when programming, it's simpler to write if (task_or_function) {handle_error_case();} // and no else or not needed, since if it was successful, you simply continue to the next part While at first a bit unintuitive, it's a convetion that makes perfect sense when you think about it a bit.
1