5 ms·
> 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 http://catb.o
by petee 2mo ago
> 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 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
- smelendez 2mo agoAnd also typing cat x to get a quick look at the file, hitting up, then piping that into another command and taking a look, hitting up, piping that result into a third command etc.
- soraminazuki 2mo agoI suppose a lot of people use less rather than cat for looking at files though. `alt + .` is much more versatile. You can use it to cycle through and insert the last arguments of previous commands.
- ndsipa_pomu 2mo agoSometimes, I'm wanting to copy text from the terminal, so "cat" is a better option if it's more than one page long or you just want to eyeball a fragment that you're going to type into a command.
- soraminazuki 2mo agoThe redirection operator is consistent and requires less typing though. I guess the file is usually the last argument because it's the one that can be omitted.
- js2 2mo agoIt's that way so that you can grep multiple files with a single pattern. It would be odd for the pattern to come after the file arguments. It also allows the files to be optional so that it can grep stdin.