|
|
|
|
|
by teddyh
3842 days ago
|
|
> I was going to mention Unix “cat” but forgot. > Wildly simple - it takes at most one argument. That is asinine. Why would a program be called ‘cat’ if it can’t concatenate multiple files? Also, his “grash” program is seriously deficient in the handling of signals – it completely ignores the issue. There are many subtle issues with signals which have to be handled correctly when writing a shell: http://www.cons.org/cracauer/sigint.html |
|
Because he only thinks it's the "echo file to terminal" command.
The main use of cat was mentioned in the Programming in the UNIX environment article.
> The fact that cat will also print on the terminal is a special case. Perhaps surprisingly, in practice it turns out that the special case is the main use of the program. [...] But what about -v? That prints non-printing characters in a visible representation. Making strange characters visible is a genuinely new function, for which no existing program is suitable. [...] The answer is ‘‘No.’’ Such a modification confuses what cat ’s job is concatenating files with what it happens to do in a common special case - showing a file on the terminal.
http://harmful.cat-v.org/cat-v/unix_prog_design.pdf