The useful use of cat
mrmr.io
The useful use of cat
1–10 of 113 posts
Re: The useful use of cat
#2A better example is ‘pv -l’. Seeing cat in a heavily-used pipeline means pv is not available.
Re: The useful use of cat
#3My main use of cat is for clipboard pasting (if I can't leverage pbpaste or something more appropriate). If I want to get something into a file or get into a pipe as stdin `cat > file` or `cat | cmd`, paste, then end with cmd-D to send an EOF and terminate the cat. For files it circumvents "helpful" formatting you would get pasting into an editor.
Re: The useful use of cat
#4"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
#5You 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.
Re: The useful use of cat
#6> Because for me it'd only be a local maxima.
Nitpick: this should be „maximum“, maxima is the plural.
Re: The useful use of cat
#7Using `cat file.txt | ...` has always felt more natural to me, so I still use it.
If I need to build a long command I've been using the excellent `up` tool to do it, e.g. `cat file.txt | up`
Re: The useful use of cat
#8cat all the things.
i cat | grep and im not ashamed of it!
cat | less - why not.? its not going to melt my pc more or less if i cat | more | less...
Re: The useful use of cat
#9Does anyone take the "don't use cat" stuff seriously?
Re: The useful use of cat
#10You 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.