I need to remove the first few character from string

March 7, 2012 at 03:47:11
Specs: Windows XP
FGS648P-Switch-172.26.5.119
odc-172.26.5.111
name odc-10.24.48.111

Need to read the above lines and i need to split up the ip address alone as a output. can any one please suggest me the solution?

Thanks in advance.

Regards,
Ramesh


See More: I need to remove the first few character from string

Report •

#1
March 7, 2012 at 18:32:10
@echo off
cls

for /f "tokens=1-3 delims=-" %%1 in (trial.txt) do (
    if "%%3" neq "" (echo IP=%%3
    ) else (
    echo IP=%%2)
)



Report •
Related Solutions


Ask Question