2 ms·
Or simply start with #!/bin/sh and stick to POSIX-compliant code. I'm not sure that writing scripts that rely on bash-specific features is such a great i
by lottin 11y ago
Or simply start with
#!/bin/sh
and stick to POSIX-compliant code.
I'm not sure that writing scripts that rely on bash-specific features is such a great idea.
- the_why_of_y 11y agoExactly how does that improve the error handling in your shell script beyond "ignore all errors", as discussed by the OP? I am genuinely curious how you would write a command with a pipe in plain POSIX /bin/sh such that a non-zero exit status from the program that writes into the pipe is detected (as can be done in bash with "set -o pipefail" or "$PIPESTATUS").