Simple dig output?
- by knocte
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 173.194.66.106
www.google.com. 300 IN A 173.194.66.104
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.)
Thanks