Computing.Net > Forums > Unix > How to use 'sed' on windows XP.

How to use 'sed' on windows XP.

Reply to Message Icon

Original Message
Name: andy1675
Date: December 1, 2004 at 10:32:39 Pacific
Subject: How to use 'sed' on windows XP.
OS: windows XP
CPU/Ram: Intel Pentium - 512MB
Comment:

I am trying to extract a number from a string using 'sed'. This works fine on Linux/Unix but when i do the same on windows XP its creating problems.

The code is as follows :

<mkdir dir="${build.dir}/framework"/>
<untar src="${framework.dist}" dest="${build.dir}/framework" compression="bzip2"/>
<exec executable="${sed_executable}" inputstring="${framework.dist}" outputproperty="framework.release">
<arg value="s/.*\([0-9]\.[0-9][0-9]\).*/\1/"/>
</exec>
</target>

---------------------

basically ${framework.dist} = /export/release/ams_4.28.tar.bz2

and i want to extract 4.28 from it.

Pls advise..

thanx



Report Offensive Message For Removal

Response Number 1
Name: Guy
Date: December 5, 2004 at 17:22:16 Pacific
Subject: How to use 'sed' on windows XP.
Reply: (edit)

To get 'sed' on Windows, you will have to have Cygwin (or equivalent) installed.

Guy


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: How to use 'sed' on windows XP.

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software