The useful use of cat
11–20 of 113 posts
Re: The useful use of cat
#12I honestly use tac more then cat
Re: The useful use of cat
#13"A la test driven development. " I would not call that test driven development (where are the testcases?) Rather more like REPL driven programming.
Re: The useful use of cat
#14Does anyone take the "don't use cat" stuff seriously?
We had just gotten over tabs vs spaces after barely a thousand years of noticing the other side is objectively wrong.
Something new that you're definitely doing wrong to blog and argue and bicker about; it can't be helped!
Re: The useful use of cat
#15You can still just begin with <somefile instead of cat somefile |. Does it really matter? No, but I don’t think pointing out useful and concise built-ins is necessarily asinine.
Yeah, there are still some edge cases where cat is useful, but more often than not I just begin the redirection. I reckon some don't realize you can put it at the beginning, which does sometimes feel more ergonomic in a pipeline.
Re: The useful use of cat
#16"A la test driven development. " I would not call that test driven development (where are the testcases?) Rather more like REPL driven programming.
Whether there are formal examples or not, the thing you're doing during REPL driven programming is testing . It's just rapid, iterative and informal.
Re: The useful use of cat
#17I honestly use tac more then cat
cat file | tacRe: The useful use of cat
#18You can still just begin with <somefile instead of cat somefile |. Does it really matter? No, but I don’t think pointing out useful and concise built-ins is necessarily asinine.
Yeah, there are still some edge cases where cat is useful, but more often than not I just begin the redirection. I reckon some don't realize you can put it at the beginning, which does sometimes feel more ergonomic in a pipeline.
Re: The useful use of cat
#19Does anyone take the "don't use cat" stuff seriously?
I still instinctively start my pipelines with cat half the time, but now I have complicated feelings about it.
Re: The useful use of cat
#20You can still just begin with <somefile instead of cat somefile |. Does it really matter? No, but I don’t think pointing out useful and concise built-ins is necessarily asinine.
But if teaching or demonstrating shell features, I'd say that it's important to know that redirection is the most efficient, explicit, and available method.
Indeed, a student could learn "cat file | ..." as a standard idiom and never use an initial redirect, but what happens when they come across one "in the wild"? They should know its proper interpretation, because it can otherwise be a bit jarring to see and difficult to interpret.