Ugly UUOC (Useless Use Of Cat). Damn peoples, please i appreciate your will to share, but share good contents and stop spreading bad shell patterns....
An introduction to data processing on the Linux command line
71–73 of 73 posts
Re: An introduction to data processing on the Linux command line
#72Useless use of cat detected! Rememeber, nearly all cases where you have: cat file | some_command and its args ... you can rewrite it as: and in some cases, such as this one, you can move the filename to the arglist as in: some_command and its args ... file — Randal L. Schwartz ( http://porkmail.org/era/unix/award.html#cat )
What makes it useless? It’s functionally the same but makes it easier to author pipelines , which I think is a valid use.
cat foo | bar
is useless use of cat, since it’s equivalent to
which is both shorter and starts one less process. Why do you think that “cat” makes it “easier to author pipelines”?Re: An introduction to data processing on the Linux command line
#73Earlier quoted context omitted.
What makes it useless? It’s functionally the same but makes it easier to author pipelines , which I think is a valid use.
cat foo | bar is useless use of cat, since it’s equivalent to which is both shorter and starts one less process. Why do you think that “cat” makes it “easier to author pipelines”?
2). I often start with `bar 3). If I just want to delete all processing and look at the input, I can’t just backspace away the processing because `< foo` is invalid.