Wednesday, March 05, 2008

10 good UNIX usage habits

10 good UNIX usage habits
When you use a system often, you tend to fall into set usage patterns. Sometimes, you do not start the habit of doing things in the best possible way. Sometimes, you even pick up bad practices that lead to clutter and clumsiness. One of the best ways to correct such inadequacies is to conscientiously pick up good habits that counteract them. This article suggests 10 UNIX command-line habits worth picking up -- good habits that help you break many common usage foibles and make you more productive at the command line in the process. Each habit is described in more detail following the list of good habits.

I'm guilty of not letting grep count ..
Avoid piping a grep to wc -l in order to count the number of lines of output. The -c option to grep gives a count of lines that match the specified pattern and is generally faster than a pipe to wc
I had no idea grep could count. I may have at one point and simply fell into the habit of using wc to count the output.

Bad admin, no cookie.
blog comments powered by Disqus