"Today, we're going to look at a few ways we can use
grep to clean up our shell scripting and make it look (and, most of
the time, actually "be") more efficient. The solutions presented in
this post can be one-upped by any number of other standard
Unix/Linux commands, but (for the sake of this post) we're going to
assume that "grep" is the be-all-end-all of input and output
processing. Suspend your disbelief, for as long as it takes to read
this post, and assume that the world is flat, grep's it and that's
that."