I have the below script for whois lookup
for line in $(cat ips.txt)
do
echo $line
whois $line | grep OrgName | awk '{print $2,$NF}'
done
I am having the output
192.168.1.1
Internet Authority
How can I achieve the output in the below format ?
192.168.1.2 : Internet Authority
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"