Skip to content

Comment on Show HN: The Unix Pipe Card Game – teach kids basic Unix commands

Comments

In the example.jpg image, we can see an example with sort -R "to shuffle the input (random sort)."

But sort -R does not randomise input if one is using NetBSD.

https://man.netbsd.org/sort.1

A POSIX-like sort has no -R option. See, .e.g, Plan9 sort or early versions of FreeBSD or OpenBSD. Early Linux did not have this non-POSIX option either. For example, look at Debian, RedHat, SuSE and other distributions in the mid-2000's. HP-UX, Minix, BusyBox, and so on have no -R option.

A different approach to teaching "basic" UNIX commands would be to focus on the portability and "lowest common denominator" and ignore non-ubiquitous options like -R. Ask the student what sequences of commands, i.e., scripts, will work on all UNIX/UNIX-like OS regardless of the age of system. From that "basic" foundation, one can then learn how the programs have evolved to become larger and more complicated (a side lesson about bloat) and all the OS-specific differences between them.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.