The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-17-2007
th3g0bl1n
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Red face Parsing text from one line with shell scripts

Hi Gurus!

I wonder if anyone can help me, I'm sure you guys can.

I have a text file which contains a lot of data on the one line as follows:


Code:

$[{"_field0":"blah","_field1":"blah","_field2":"blah","_field3":"blah","field4":"blah","field5":blah,"field5":blah},{"html":1,"type":"bingo","bingo":"Results <span class='b'>1<\/span>-<span class='b'>50<\/span> of <span class='b'>497<\/span> for <span class='b'>match<\/span>"},{"id":"2549425,12087370,6013917","ids":62,"type":"record","name":"blah - smashing"},{"id":"4736260,7981901,5614559","ids":52,"type":"record","name":"blah - sorry"}

What I need to do is pull all of those id values out (eg 2549425) and write them to a list in a text file.

Any help would be greatly appreciated!

th3g0bl1n