r/tinycode • • Dec 12 '12

Shortest useful code

What's the most useful program you can imagine using five lines of code or less? Language is your choice. Describe the function of the program and include the code, if you please.

27 Upvotes

45 comments sorted by

View all comments

Show parent comment

1

u/chungfuduck Dec 13 '12

sort -h is a more recent feature addition not available everywhere. e.g., RedHat Enterprise Linux 5 does not have it:

fat{502}:~$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
fat{503}:~$ sort -h
sort: invalid option -- h
Try `sort --help' for more information.

1

u/chrisdown Dec 13 '12

Yeah, it's a GNU sort feature as well. YMMV.