Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk command in DOS/Windows?

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
SI
Hi,

I would like to get value X1 from line 1 (see sample bellow) and Y1 from line 2.

Sample
ABC = X1 Y 2.1
ABC = Y1 Z 1.1

My question: Is there someting like unix command 'awk' in Dos/Windows?

Thanks,
Grofaty
 
Hi,

I have found out how to do this in Windows:

FOR /F "tokens=4" %%i IN (test.txt) DO (
echo %%i
IF "%%i" == "DB2/NT" goto one
IF "%%i" == "SQL/DS" goto two
)

No help is needed anymore.

Thanks,
Grofaty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top