tongue_of_colicab
Veteran
I'm trying to write a windows batch file that will either extract or remove text from a file not matching a regex.
What I'm doing is this:
Run traceroute & copy results to file
Run findstr regex against results to extract only class a/b/c addresses
Now the problem is findstr is copying the whole line which is no good to me because I want to use the IP on the last line as a variable for the next piece of my script that will use that IP to try and download a log file from our equipment.
Anybody knows how I could achieve what I want?
What I'm doing is this:
Run traceroute & copy results to file
Run findstr regex against results to extract only class a/b/c addresses
Now the problem is findstr is copying the whole line which is no good to me because I want to use the IP on the last line as a variable for the next piece of my script that will use that IP to try and download a log file from our equipment.
Anybody knows how I could achieve what I want?