cut is a UNIX program that is used to (quote man cut) "remove sections from each line of files". It is very useful in combination with grep, tail, head, sort, uniq and loads of other text utilities.

This would print fields 1,2,3 and 5 from a flat text file with fields seperated by commas to STDOUT:

cat file.txt | cut -d , -f 1-3,5
Where -d is for delimiter and -f is for field(s). It has lots of other uses, so read the fine manual.