6 ms·
What makes it useless? It’s functionally the same but makes it easier to author pipelines, which I think is a valid use.
by dblotsky 7y ago
What makes it useless? It’s functionally the same but makes it easier to author pipelines, which I think is a valid use.
- teddyh 7y agocat foo | bar is useless use of cat, since it’s equivalent to < foo bar which is both shorter and starts one less process. Why do you think that “cat” makes it “easier to author pipelines”?
- dblotsky 7y ago1). It doesn’t work in all shells, so you have to think about your environment before you use it. 2). I often start with `bar < foo`, so if I need to add more arguments to `bar`, I need to always skip over the input. 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.