in reply to Sorting through a file with multiple tables and extracting data

One liner solution:
perl -anlF[^\\w\\.\-]+ -e 'next unless @F;shift @F;next if $F[0]=~/-- +/;;print join(",",@F)' testdata1.txt
check "perl --help" to review options used.

Interchange Single and double quotes, if you want to run under Window$ . (Not sure if it will require the "\\" escape under Windows.)

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams

  • Comment on Re: Sorting through a file with multiple tables and extracting data
  • Download Code