Reply to post: Shorter true and true that returns false

This is why copy'n'paste should be banned from developers' IDEs

Flocke Kroes Silver badge

Shorter true and true that returns false

Back in the dawn of time, true was an empty file. The OS interpreted it is 'do nothing', which it was always able to do, and returned success. Then there were lawyers who ordered everything to have a copyright notice. You can see the results here. Note that the AT&T version does not start by identifying the required interpreter. The OS sees the file is not empty, so clearly it has to do something, but has no idea what it is. As the OS cannot execute AT&T's true, it returns failure!

Sun licensed AT&T true (anyone know how much true costs?), and fixed the bug for Solaris.

It could be worse: man echo.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon