2 ms·
Agreed. He says he can't remember the syntax for such and such in grep, but the regexen he follows up with seem complicated enough to me. Now, there's stuff th
by wonderzombie 14y ago
Agreed. He says he can't remember the syntax for such and such in grep, but the regexen he follows up with seem complicated enough to me.
Now, there's stuff that never sticks in my brain (tests in shell, sigh). But generally there's less syntax and therefore less to remember in a chain of greps. Composition of simple piece is easier to understand than one equivalent and therefore more complex piece. Heck, the power of the shell is predicated on this idea.
Perhaps the best part about ack is that it's simple to restrict your search of files to a given pattern with a command line flag rather than using shell globbing. You could wrap invocations of grep with a shell function or another script, but that's still not great.