LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-01-2009, 09:13 AM   #1
anrchist007
LQ Newbie
 
Registered: Apr 2009
Location: Virginia
Distribution: Fedora 10
Posts: 1

Rep: Reputation: 0
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?
 
Old 04-01-2009, 02:59 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: Russia
Distribution: NixOS (http://nixos.org)
Posts: 1,893

Rep: Reputation: 68
Use xxd or hexdump. You will get text output with codes of bytes. Use sed.. Convert back.
 
Old 04-02-2009, 06:12 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Perl can do that
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A data parsing problem - AWK indiancosmonaut Programming 1 02-24-2009 10:34 AM
Parsing Email Data Geneset Linux - General 1 07-23-2007 05:31 PM
parsing data - better way of doing that kshkid Programming 10 01-08-2007 06:05 AM
help extracting data from csv file willinusf Linux - General 10 10-27-2006 09:10 PM
Extracting data from broken drive darin3200 Linux - Software 1 07-12-2003 01:34 PM


All times are GMT -5. The time now is 10:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration