3 ms·
Picky overcorrect comment: Try dig +short instead of dig +noall +answer +additional i.e. dig +short mumbai.time @dns.toys gives you the short
by ktpsns 4y ago
Picky overcorrect comment: Try
dig +short
instead of
dig +noall +answer +additional
i.e.
dig +short mumbai.time @dns.toys
gives you the short and breve answer you probably expect :-)
- contingencies 4y agoNot quite, some queries have multiple records and multiple response fields, so it's necessary to do: dig +short london.time @dns.toys |head -n 1 |cut -d '"' -f4 In order to get clean time for a city, for example. At which point you'd be better learning the arguments to local tools. But anyway, cute hack and cool mountain-name. :)
- jedberg 4y agoYou wouldn't use London.time in your query in a script though, because it returns multiple answers. You'd use London/gb or London/ca.time And furthermore, +short gives you the same multiple answers that +noall +answer +additional does, without the extra dns stuff that you don't need.