てきとうなメモ

本の感想とか技術メモとか

useless use

$ cat foo | perl -ne 'blah'

これは確かについやってしまうし,プロセス起動する分リダイレクトよりも無駄なんだけども,パイプラインでつなげた方が分かりやすいよねという話.はげどう.

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.

Useless Use of Cat Award

そもそもcatをconcatenateのイメージで使っていないな.とりあえず標準出力に出して何かに渡すというイメージが強い.