LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Data Parsing/Extracting (https://www.linuxquestions.org/questions/linux-software-2/data-parsing-extracting-716055/)

anrchist007 04-01-2009 09:13 AM

Data Parsing/Extracting
 
Hey Guys

I am looking for a quick way to parse through a file and extract anything matching a particular pattern.

I have an image file (RAW dd) and I want to go through it and pull out all Unicode escape sequences (\u0000, \uFFFF, etc) and output them to a file. I have already written a program that will take a file containing escape sequences and generate the actual text but I first need to get them out of the image.

I considered using awk but to the best of my knowledge it requires some sort of structure (line or comma delimited). Any ideas/suggestions?

raskin 04-01-2009 02:59 PM

Use xxd or hexdump. You will get text output with codes of bytes. Use sed.. Convert back.

chrism01 04-02-2009 06:12 AM

Perl can do that


All times are GMT -5. The time now is 09:00 PM.