extracting elements
I'm stuck between a rock and a hard place...hopefully you can help.
I have a text file filled with all sorts of junk....sprinkled throughout are "proprietary" markup tags. Here's an example: Code:
COM blah
what I need is a script that will extract all the {{???}} elements. My plan (at this point) is to pipe that through "sort -u" and create a DB table with a column for each unique element. I'm still early in my research on the best way to accomplish my task, but in any case, a bash/sed/awk/perl script that would return my unique elements would be very helpful. basically....a non-greedy 'grep -e "{{.*}}" filename' any help is appreciated.... thanks, -sky |
maybe something like this:
Code:
grep "{{" DTAGSTHD | sed 's/[ \t]*{{/{{/g' | sed 's/}}{{/}}\n{{/g' | sed 's/[ \t]*$//' |
All times are GMT -5. The time now is 10:05 PM. |