In a script I want to be able to write an IP address to somewhere easily, so I thought using dig (or a similar command) with back-ticks.
However the simplest output I've been able to come up to wrt dig parameters is
> dig -t A +noall +answer www.google.com www.google.com. 300 IN A 188.8.131.52 www.google.com. 300 IN A 184.108.40.206
Any way (extra arg, different tool instead of dig?) to get rid of the junk apart from the IP address?? (And please don't tell me to use sed.)