To view IP addresses or AS numbers associated with an organisation, the “inverse query” can be used.
WHOIS -h WHOIS.afrinic.net -i org <ORG-HDL> -r -T inetnum,inet6num,aut-num
The above WHOIS query will display IPv4 address, IPv6 address and AS number records associated with a particular organisation object.