Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

csv file.


I need to read that file and get the lines of file containing abc.

share|improve this question
grep ",abc" file.csv

Sounds enough? Or to be sure it finishes with abc:

grep ",abc$" file.csv

(in this case the last one in your example won't match due to the full stop at the end)

share|improve this answer
+1 for the correct pattern. Don't need cat though: grep ",abc" file.csv. Another way to match just the word "abc" and not "Aabc" or "abcd" is to use word anchors: '\<abc\>' – glenn jackman Jan 24 '14 at 15:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.