4 ms·
Do you really think cat is as simple as left-pad? https://github.com/freebsd/freebsd/blob/master/bin/cat/cat.c https://github.com/freebsd/freebsd/blob/master/b
by bmurphy1976 8y ago
Do you really think cat is as simple as left-pad?
https://github.com/freebsd/freebsd/blob/master/bin/cat/cat.c https://github.com/freebsd/freebsd/blob/master/bin/cat/cat.c
Also, cat is kind of an important primitive for building a functional system that uses files as one of its core abstractions. It makes total sense that it would (a) exist and (b) be well maintained by an authoritative and reliable source.
Left pad it is not.
- marshray 8y ago> `cat` without any options Interestingly, the `raw_cat()` function is 37 lines long. https://github.com/freebsd/freebsd/blob/e511976db9f51bae1a5986e1f1d7653d8f31fbae/bin/cat/cat.c#L299 https://github.com/freebsd/freebsd/blob/e511976db9f51bae1a59...
- kps 8y agoUNIX `cat`, unchanged from V2 through V6 until it was rewritten in V7, was 44 instructions.