Skip to content

Comment on Found a program I wrote in 1981 and decided to bring it back to life

Comments

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.

For those who want tools like these:

AINTERB = comm -12 (https://en.wikipedia.org/wiki/Comm)

UNIQUELN = uniq (https://en.wikipedia.org/wiki/Uniq)

XBLNKLNS = cat -s (GNU cat only; https://en.wikipedia.org/wiki/Cat_(Unix) )

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.