PSA about abuse of cat(1) command. Don't abuse cats
abuseofcats.com
PSA about abuse of cat(1) command. Don't abuse cats
1–10 of 62 posts
Re: PSA about abuse of cat(1) command. Don't abuse cats
#2Re: PSA about abuse of cat(1) command. Don't abuse cats
#3http://catb.org/jargon/html/U/UUOC.html
Admittedly its taken me a long time to remember that the file is the last argument to grep, when so many other commands its the first. I'd guess common abuse is due to being easier to type cat x | than to dig up the man page
Re: PSA about abuse of cat(1) command. Don't abuse cats
#4Re: PSA about abuse of cat(1) command. Don't abuse cats
#5Re: PSA about abuse of cat(1) command. Don't abuse cats
#6 VSZ RSS SZ CMD
3252 1608 813 /bin/cat
To me there are far more things to worry about than cat. How about your multi-gig browser for one ?Now for firefox:
VSZ RSS SZ CMD
3472212 395968 868053 /usr/lib64/firefox/firefox
Maybe people should be looking at that ? I will not even get into modern Linux Desktops :)Re: PSA about abuse of cat(1) command. Don't abuse cats
#7> Since 1995, occasional awards for UUOC have been given out, usually by Perl luminary Randal L. Schwartz http://catb.org/jargon/html/U/UUOC.html Admittedly its taken me a long time to remember that the file is the last argument to grep, when so many other commands its the first. I'd guess common abuse is due to being easier to type cat x | than to dig up the man page
Re: PSA about abuse of cat(1) command. Don't abuse cats
#8[flagged]
cat file | grep thingone
cat file | grep thingtwo
Vs grep thingone file
grep thingtwo fileRe: PSA about abuse of cat(1) command. Don't abuse cats
#9[flagged]
Chances are the file stays the same and what Im grepping for changes, so after the first run, it was less work for me not needing to go back as far in the command cat file | grep thingone cat file | grep thingtwo Vs grep thingone file grep thingtwo file
Re: PSA about abuse of cat(1) command. Don't abuse cats
#10When you're building a pipeline, putting cat first can often be quite convenient. Essentially, it's more composable: it defines the input to the pipeline without committing to a specific tool. For example, you can up-arrow in the shell and change the part after the pipe without having to skip back past the filename.
In fact if you don't start with cat, it's possible you're more of a script kiddie than a software developer.