Files
tuend-work 0b28a76e20 ud
2025-11-12 23:24:15 +07:00

24 lines
294 B
Bash

#!/bin/sh
DIG=/usr/bin/dig
WHOIS=/usr/bin/whois
if [ $# -ne 1 ]; then
echo "Usage:";
echo " $0 ip";
exit 1;
fi
if [ ! -x "$DIG" ]; then
echo "Cannot find $DIG or it's not executable.";
exit 2;
else
$DIG -x "$1" +noshort 2>&1
fi
if [ -x "$WHOIS" ]; then
$WHOIS "$1" 2>&1
fi
exit 0;