by nikau · 4y ago · 0 comments
More likely is you are messing around with some new/infrequently used utility and you pass in the arguments incorrectly and specify "file" as the output instead of the input as intended.
At the end of the day do whatever pattern works for you - for me it's doing "cat file |" at the start of a pipeline and "> outfile" at the end.
I also avoid globbing inside a pipeline as it can be dangerous too.