|
发表于 2003-10-19 19:23:52
|
显示全部楼层
奇怪的、没用的用法,呵呵:
UUOC [from the comp.unix.shell group on Usenet] stands for `Useless Use of cat'; the reference is to the Unix command cat(1), not the feline animal. As received wisdom on comp.unix.shell observes, "The purpose of cat is to concatenate (or `catenate') files. If it's only one file, concatenating it with nothing at all is a waste of time, and costs you a process." Nevertheless one sees people doing
cat file | some_command and its args ...
instead of the equivalent and cheaper
<file some_command and its args ...
or (equivalently and more classically)
some_command and its args ... <file
see http://en.wikipedia.org/wiki/Cat_(Unix) |
|