Post History
Especially in a pedagogical context, the issue with something like cat /dev/random | head -c 20 versus the more straightforward head -c 20 /dev/random is that it communicates that extra ceremony is...
Answer
#1: Initial revision
Especially in a pedagogical context, the issue with something like `cat /dev/random | head -c 20` versus the more straightforward `head -c 20 /dev/random` is that it communicates that extra ceremony is necessary. It isn't. Using one program instead of two isn't about saving kilobytes of computer memory; it's about saving human thought. Different brains are going to work differently, and if yours is ridged such that you need that extra program in there, have a great time with that. But it's simply a fact that the `cat` is useless in that context—even a program that only accepts input from stdin can be written `fooprog </dev/random`—and most people in tech culture prefer to remove useless components from their tech.