2

I want to extract data from large group of files based on a regular expression.

Is their an application, script, batch or terminal command to do this?

2

grep should be what you want. It is very powerful. You can search multiple files for a pattern and you can even select the matcher.

There are many many options so you should really look up its man page I've linked you to.

  • 1
    awk and sed are also very powerful tools for parsing text files. – Nick Pascucci Mar 27 '11 at 16:41
  • @codeMonk very true. You should post that as an answer. – Octavian Damiean Mar 27 '11 at 16:55
  • yes grep is very powerful!! But is there a way to output the found regexp? grep usually outputs the whole line + filename – malhobayyeb Mar 31 '11 at 22:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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