talideon.com

Blackout Ireland

March 3, 2008 at 5:23PM Stupid hacks: nsping

Sometimes I need to check if there’s a nameserver running on some host. Here’s the stupid script I use to save myself from having to remember how.

#!/bin/sh
dig @$1 -t a "127.0.0.1" | \
    sed -n -e '/^;; Query time:/p' | \
    cut --delim=" " -f4,5