/ Published in: Bash
If you pass the +short option to dig, it will give you a really short and sweet answer - just the IP address.
$ dig fosswire.com +short
208.113.149.33
$ dig fosswire.com +short
208.113.149.33
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$ dig fosswire.com +short 208.113.149.33 $ dig fosswire.com ; <<>> DiG 9.4.1-P1 <<>> fosswire ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27325 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;fosswire. IN A ;; Query time: 86 msec ;; SERVER: 10.0.1.1#53(10.0.1.1) ;; WHEN: Tue Apr 29 01:03:13 2008 ;; MSG SIZE rcvd: 26
URL: http://fosswire.com/tag/cli/page/18/