4 ms·
I have a program that old I just keep using and don't have "to bring it back to life": Given two text files A and B with the lines sorted in ascending order, w
by graycat 5y ago
I have a program that old I just keep using and don't have "to bring it back to life":
Given two text files A and B with the lines sorted in ascending order, write a file C with the lines in common between A and B. Sure, the program is just a little command line thing with name AINTERB for A intersect B since the program is a version of intersection in set theory.
Ah, there is another one: Given a text file A with the lines sorted in ascending order, keep only the unique lines. So, that name of that one is UNIQUELN.
One more, XBLNKLNS, for delete extra blank lines, that is, so that there are no cases of more than one blank line adjacent, in a row, together.
- Someone 5y agoFor those who want tools like these: AINTERB = comm -12 (https://en.wikipedia.org/wiki/Comm https://en.wikipedia.org/wiki/Comm) UNIQUELN = uniq (https://en.wikipedia.org/wiki/Uniq https://en.wikipedia.org/wiki/Uniq) XBLNKLNS = cat -s (GNU cat only; https://en.wikipedia.org/wiki/Cat_(Unix) https://en.wikipedia.org/wiki/Cat_(Unix) )