Magic Banana added responses to questions he didn't know I'd asked; our notes
apparently crossed in the ether !
My inefficient (but clear to me) scripts needed that extra collection of
single-line PTR's because I use them
in my one-at-a-time join command; afterwards, they're not needed any more,
but take up a lot of inefficiently
used disk unit storage.
I've fixed the duplicates issue in my join command.
Those unwieldy tables of PTR's and their multiple addresses will soon be
scrolling down the screen so far
that the filename may disappear from view; and the -Vk 2 option puts the
IPv4's in visually searchable order.
2GB/60kB times 0.3 seconds is seriously longer than times 0.01 second: 2.8
hours vs. 5.6 minutes. Touche.
Magic Banana condensed his already slender script to the utmost:
Now, if you want the duplicates [No !], if you insist on the file name[s?]
you chose and if you really want the
repeated PTR in a first field (what only looks like a waste of disk space),
it is trivial to adapt my solution:
awk 'FILENAME == ARGV[1] { a[$1] = $2 } FILENAME == ARGV[2] && $1 in a {
print $1, $2 >> "CountsFiles/" $1 "." a[$1] ".txt" }' PTRList.txt
IPv4.May2020.37.nMapoG.txt
It works ! Thanks for your script's astounding brevity, for your accurate
scripting, and for being so diligent.
In the final reckoning, IPv4.May2020.37.nMapoG.txt (60kB) becomes
IPv4.May2020.100.nMapoG.txt (2GB).
PTRList.txt can keep the same name.
George Langford