With both apologies and thanks to Magic Banana, yesterday I set about to find an independent solution
within which I can follow the logic.

Here is the series of scripts that accomplish the stated task. They are based on the previously
attached PTRListSort.txt and IPv4.May2020.37.nMapoG.txt as illustrative data.

The first script makes the 42 files that will hold the multi-address PTR's and their IPv4 addresses: awk '{print $1,$2}' 'PTRList.txt' | awk '{print "touch CountsFiles/"$1"."$2".txt ;"}' '-' > Script.MakeFiles.txt

The second script makes 42 additional files, each one ready to contain just one PTR: awk '{print $1,$2}' 'PTRList.txt' | awk '{print "touch PTR-files/"$1".txt ; "}' > Script.MakePTR-files.txt

The third script writes the PTR names into their just-created files:
awk '{print "echo "$1}' 'PTRList.txt' > Temp0718A.txt ;
awk '{print " > PTR-files/"$1".txt ;"}' 'PTRList.txt' > Temp0718B.txt ;
paste -d ' ' Temp0718A.txt Temp0718B.txt > Script.Fill.PTR-files.txt ; rm Temp0718A.txt Temp0718B.txt

The fourth script creates and lists 42 individual scripts, each one of which collects and writes the joined address data to its just created file. Note that the first file in the join command contains only one line: awk '{print "join -a 1

Reply via email to