Unix may seem little daunting at the beginning when you start writing a shell script to automate a task. But there are two UNIX tools that can save you from some real headache.
1. AWK
2. Sed
You don't have to learn them completely to start using them. But in case you are interested in learning more about them just follow the above links. There are couple of commands that you can start using right away to write good shell scripts. You will have to remember one rule in UNIX that you can pass the output of one command to another command by using a pipe "|"
Below are some of the AWK and Sed which I use quite often to accomplish various tasks:
Get a particular field from a line of text, one line at a time, till you reach the EOF:
ps -ef | awk '{print $2}'