In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to batch bat text will txt the first column of the same content of the last column of the number added, has a certain reference value, interested friends can refer to, I hope you read this article after a great harvest, the following let Xiaobian take you to understand.
For example, AAA.txt reads as follows
11111,20150430,10
11111,20150430,20
11111,20150430,30
22222,20150430,40
33333,20150430,50
44444,20150430,60
44444,20150430,70
55555,20150430,80
66666,20150430,90
66666,20150430,100
77777,20150430,110
Separate three sections by commas, match the same with the first section, for example, the first row 11111, then the second and third rows are considered to be the same as the first row, and then add the third section values of the same row.
The final results are as follows:
11111,20150430,60
22222,20150430,40
33333,20150430,50
44444,20150430,130
55555,20150430,80
66666,20150430,190
77777,20150430,110
core code
@echo offfor /f "useback tokens=1,2,3 delims=," %%i in ("aaa.txt") do set /a "#%%i#%%j+=%%k"(for /f "tokens=1,2,3 delims=#=" %%i in ('set #') do echo %%i,%%j,%%k)>New_aaa.txt Thank you for reading this article carefully. I hope that Xiaobian will share "How to batch bat to add the last column of the same line of txt text" This article is helpful to everyone. At the same time, I hope everyone will support me more, pay attention to the industry information channel, and more relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.