How to insert multiple IP addresses in a pg_hba.conf file via unix shell script?
If you have a file which holds all the addresses (1 at a line) you can do:

cat ipaddresses.txt | while read line; 
do 
  ./reset_ip.sh $line /root/Desktop/BashScripts/pg_hba.conf; 
done


or, with gawk:

gawk '{ system("./reset_ip.sh $1 /root/Desktop/BashScripts/pg_hba.conf") }' ipaddresses.txt