Batch file 将批处理输出反向读取为字符串
我从追踪器中得到了以下输出:Batch file 将批处理输出反向读取为字符串,batch-file,traceroute,Batch File,Traceroute,我从追踪器中得到了以下输出: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\test>tracert speedtest.danskkabeltv.dk Tracing route to speedtest.danskkabeltv.dk [62.61.131.22] over a maximum of 30 ho
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\test>tracert speedtest.danskkabeltv.dk
Tracing route to speedtest.danskkabeltv.dk [62.61.131.22]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 192.168.1.1
2 1 ms <1 ms <1 ms 10.59.17.1
3 4 ms 1 ms 2 ms 172.17.2.137
4 * 1 ms 1 ms 172.17.4.51
5 1 ms 1 ms 1 ms 172.17.4.10
6 * * * Request timed out.
7 * * * Request timed out.
8 3 ms 2 ms 2 ms 0xc2ffb9c1.linknet.dk.telia.net [194.255.185.193]
9 * 3 ms 2 ms 0xc2ff8561.linknet.dk.telia.net [194.255.133.97]
10 5 ms 8 ms 12 ms 0xc2ff8562.linknet.dk.telia.net [194.255.133.98]
11 4 ms 4 ms 3 ms 87.72.143.234
12 4 ms 3 ms 3 ms 62.61.140.26.generic-hostname.arrownet.dk [62.61.140.26]
13 3 ms 3 ms 3 ms 62.61.140.42.generic-hostname.arrownet.dk [62.61.140.42]
14 3 ms 2 ms 2 ms speedtest01-hor.aplus.dk [62.61.131.22]
Trace complete.
我需要做的是从右到左阅读课文。因此,如果我执行for/f,第一个将是最右边的,依此类推
这可以做到吗?如果您使用的是Unix或BSD,它将是一个单行程序,但我对Windows不太了解。顺便说一句,如果你能弄明白这一点,那么最好添加一个你自己的答案,以便将来有人能从中受益。