I'm very inexperienced with batch commands and scripting but what I want to do is is run the tracert command on a number of IP address ranges (192.168.1.1 - 192.168.1.255) as well as some other address ranges (I would like to save the ranges into a text file from which to inject into the batch/script).
When I run the tracert command, the first new line is blank and then on the second line there is information that I need to save into the file and then the command should be terminated. After this command runs I need it to run the next number in the range.
Where is a good place to start to figure out what I need to make this possible. Is this a batch file or a script?
Need to tracert IP range & save 2nd line of output to file
Moderator: DosItHelp
-
- Posts: 3
- Joined: 20 Mar 2014 12:43
Need to tracert IP range & save 2nd line of output to file
Last edited by Grepawking on 20 Mar 2014 15:26, edited 1 time in total.
Re: Need to tracert IP range & save 2nd line of output to fi
Just wondering if you already tried using Grep and Awk to do this?
-
- Posts: 3
- Joined: 20 Mar 2014 12:43
Re: Need to tracert IP range & save 2nd line of output to fi

Re: Need to tracert IP range & save 2nd line of output to fi
Grepawking wrote::D Linux doesn't resolve the hostname of the IP the same way that DOS does, at least I haven't found a way to do it - thus I'm having to do this on a windows machine.
That doesn't answer my question.
Re: Need to tracert IP range & save 2nd line of output to fi
If you only want to resolve hostnames of a given IP, then why don't you use nslookup.Grepawking wrote::D Linux doesn't resolve the hostname of the IP the same way that DOS does, at least I haven't found a way to do it - thus I'm having to do this on a windows machine.
Should be the default program name for all oses (DOS, Win, Linux, Mac, ... all versions).
penpen
-
- Posts: 3
- Joined: 20 Mar 2014 12:43
Re: Need to tracert IP range & save 2nd line of output to fi
penpen wrote:If you only want to resolve hostnames of a given IP, then why don't you use nslookup.Grepawking wrote::D Linux doesn't resolve the hostname of the IP the same way that DOS does, at least I haven't found a way to do it - thus I'm having to do this on a windows machine.
Should be the default program name for all oses (DOS, Win, Linux, Mac, ... all versions).
penpen
I just found that and it makes everything much easier. Thanks for the suggestion.