On 10/08/2009 10:15 PM, Collin M. wrote:
I am slowly learning Ruby and working on a solution. I have huge text
files with tons of garbage and I want to extract just specific lines
including the word ‘TestPhase’.
Looking for simple solutions, just struggling with the problem.
If you only need to extract those lines the most efficient solution is
If you want to do it in Ruby you can do
ruby -ne ‘puts $_ if /TestPhase/’
If you need to further process those lines you can do
if /TestPhase/ =~ line
There are probably plenty other options.