There is a file file.txt containing lines:
536|разный текст|еще какойто текст|какие то цифры 6352|разный текст|еще какойто текст|какие то цифры 723|разный текст|еще какойто текст|какие то цифры 37|разный текст|еще какойто текст|какие то цифры ....и тд. it is necessary to delete those lines whose digit at the very beginning of the line (preceded by the character "|") is already found in another line in the same place (that is, at the very beginning before the first character "|").
that is, remove duplicates, but a duplicate, if not the entire row is the same, but only the first “column”, but the entire row must be deleted,
not both options should be deleted, some one should remain.
There can be more than two such "duplicates" of a single line in a file.
|- nick_n_a