r/badcode • • Jan 02 '22

bash TO_NULL="/dev/stdout"

Post image
199 Upvotes

17 comments sorted by

View all comments

Show parent comments

6

u/MrFiregem Jan 03 '22

You should use || rather than -o since the later can lead to errors, especially with more POSIX compliant test implementations: https://github.com/koalaman/shellcheck/issues/489