1.

Solve : How do I select text from text file??

Answer»

Hi there:
I didn't find how POSSIBLE to select text from text-file
for example I have xml-file with string:
<suit:run DATE="Thu 12/21/2012 12:12 PM EST" machine="garg" build="27801" level="alpha" release="7.8" os="Windows XP">

I need select only build number <<27801>> not all string, such as FIND works.

FIND works:

>find "build" suite.xml

---------- SUITE.XML
    <suit:run date=" Thu 12/21/2012 12:12 PM EST" machine="garg" build="27801" level="alpha" release="7.8" os="Windows XP">


 you are going to use better tools than that. Download sed from GNU win32, and then do this one LINER

Code: [Select]C:\test>sed -n "/build/s/\(.*build=\"\)\([0-9]\+\)\(.*\)/\2/p" file
27801



Discussion

No Comment Found