Have I mentioned lately how I really like IBM's developerWorks site? I don't think I have.
I already know all of these tricks, but I still catch myself in bad habits on occasion -- for instance, I rarely using grep to count matches and I sometimes pipe things with cat when I don't need to.
The 10 good habits in the article are as follows:
- Make directory trees in a single swipe.
- Change the path; do not move the archive.
- Combine your commands with control operators.
- Quote variables with caution.
- Use escape sequences to manage long input.
- Group your commands together in a list.
- Use xargs outside of find.
- Know when grep should do the counting -- and when it should step aside.
- Match certain fields in output, not just lines.
- Stop piping cats.
Continue reading: Learn 10 good UNIX usage habits (via IBM developerWorks portal)