There is a very useful tool on this website. Use the "search" tab on the homepage.
You can type in "grep" and "pipe". You might also try searching for "awk", "find", or "script".
These should help you find out about grep and pipe.
here are some examples of mine.
You can use grep to extract data from a file a few ways.
cat /path/to/filename |grep word
A more effiecient way is:
grep word /path/to/filename
You can use pipe to send the output of a command into another command. as such.
finger | grep userID > filename
or
cat /etc/passwd |awk -F: '{ print $1, $6 }' > /some/filename
This last one will take the output of cat and give it to awk to process and take out the 1st and 6th fields of the /etc/passwd file and then send it to a file.
If you would like to learn more about this, get a book on Sed and Awk. Also the Unix in a Nutshell book both by O'Reilly.
Go to the FAQ on this site's home page to see more good books.
Have Fun!!!