3 ms·
Not 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 '"'
by contingencies 4y ago
Not 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.