Get the App
SLTechnology News&Howtos  ›  Development  › 

How to delete duplicate rows in batch processing

Shulou Source: shulou.com Published: 2022-06-03 07:53:35 11月15日 Update

This article is to share with you about how batch processing can delete duplicate rows. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The code is as follows:

@ echo off

:: delete duplicate lines, but cannot leave blank lines

Text that does not conform to the variable naming rules and the number of variables exceeds the limit cannot be handled correctly

::

(file contents after echo clears duplicate lines: & echo.) > str_.txt

For / f "delims="% I in (test.txt) do (

If not defined I set iTuna & echo I > str_.txt)

Start str_.txt

Thank you for reading! This is the end of this article on "how to delete duplicate lines in batch processing". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it out for more people to see!

Tags: Content variables more articles good practical number code files text articles see knowledge blank lines rules reference processing help related restrictions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Technology MySQL vpn Redmi