I have a text file with one email address per line. How can I remove the domain part but not the TLD part of each line? In here, we would define TLD to be the last element of the string after the last dot character.
In other words, sample input:
firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
foobar@org john.smith@com chunkylover69@dk qwerty@uk