25
What Am I Doing Wrong?
(lazysoci.al)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
In addition to what everybody said:
Those will help catch many problems before they happen or exactly when they happen.
P.S I would recommend against
It can introduce some very weird behaviour when it doesn't work.
Anti Commercial-AI license
Thank you so much. Especially for the Shell Check. That's an invaluable resource.
Could you elaborate on the weird behaviour introduced by
pipefail
?This wiki explains one pitfall of nonstandard return codes in pipes. The other one that bit me is pipes that just stop existing (error 141).
Anti Commercial-AI license
Thanks. Bash should just be avoided except trivial uses. It has an impressive collection of footguns. I've written a lot of bash, even used it for CGI scripts to create web tools, but honestly it is time to move on. Ansible and Python cover most of the bash use cases.
I fully agree with you. Hopefully newer shells will be used for distros (nushell, xonsh, osh, ...). Backwards compatibility with bash is a huge pitfall that should be a disqualification criterion.
Anti Commercial-AI license