如何把txt文件中的字符的替换为递增的数字?
natserver#protocoltcpglobalcurrent-interface50000inside10.153.0.150000natserver#proto...
nat server # protocol tcp global current-interface 50000 inside 10.153.0.1 50000
nat server # protocol tcp global current-interface 50001 inside 10.153.0.1 50001
nat server # protocol tcp global current-interface 50002 inside 10.153.0.1 50002
nat server # protocol tcp global current-interface 50003 inside 10.153.0.1 50003
nat server # protocol tcp global current-interface 50004 inside 10.153.0.1 50004
nat server # protocol tcp global current-interface 50005 inside 10.153.0.1 50005
请问怎么才能把上面的一个txt文档中的#通过批处理文件替换成下面这样呢?
nat server 1 protocol tcp global current-interface 50000 inside 10.153.0.1 50000
nat server 2 protocol tcp global current-interface 50001 inside 10.153.0.1 50001
nat server 3 protocol tcp global current-interface 50002 inside 10.153.0.1 50002
nat server 4 protocol tcp global current-interface 50003 inside 10.153.0.1 50003
nat server 5 protocol tcp global current-interface 50004 inside 10.153.0.1 50004
nat server 6 protocol tcp global current-interface 50005 inside 10.153.0.1 50005 展开
nat server # protocol tcp global current-interface 50001 inside 10.153.0.1 50001
nat server # protocol tcp global current-interface 50002 inside 10.153.0.1 50002
nat server # protocol tcp global current-interface 50003 inside 10.153.0.1 50003
nat server # protocol tcp global current-interface 50004 inside 10.153.0.1 50004
nat server # protocol tcp global current-interface 50005 inside 10.153.0.1 50005
请问怎么才能把上面的一个txt文档中的#通过批处理文件替换成下面这样呢?
nat server 1 protocol tcp global current-interface 50000 inside 10.153.0.1 50000
nat server 2 protocol tcp global current-interface 50001 inside 10.153.0.1 50001
nat server 3 protocol tcp global current-interface 50002 inside 10.153.0.1 50002
nat server 4 protocol tcp global current-interface 50003 inside 10.153.0.1 50003
nat server 5 protocol tcp global current-interface 50004 inside 10.153.0.1 50004
nat server 6 protocol tcp global current-interface 50005 inside 10.153.0.1 50005 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询