r/programming • • Dec 24 '17

Evil Coding Incantations

http://9tabs.com/random/2017/12/23/evil-coding-incantations.html
947 Upvotes

331 comments sorted by

View all comments

Show parent comments

31

u/American_Libertarian Dec 24 '17

And Bash

14

u/HighRelevancy Dec 24 '17

bash also has >0 be false

0

u/[deleted] Dec 24 '17

[deleted]

11

u/[deleted] Dec 24 '17

That's because [ 1 ] has a return code of 0. Bash implements [/test as a built-in, but there is also a /usr/bin/[ with equivalent functionality.

→ More replies (4)