+

Fix .org TLD check

Benjamin Renard [2017-07-28 21:51:36]
Fix .org TLD check
Filename
check_domain
diff --git a/check_domain b/check_domain
index 33277c4..30a914f 100755
--- a/check_domain
+++ b/check_domain
@@ -77,7 +77,7 @@ case $TLD in
 	*)
 		EXTXT=`echo -e "$WHOIS"|grep "^expires:"|tail -n 1`
 		[ $DEBUG -eq 1 ] && echo "expire result format 1 : $EXTXT"
-		[ ! -n "$EXTXT" ] && EXTXT=`echo -e "$WHOIS"|egrep "([^:]*Expiration Date|Renewal date|Registry Expiry Date)"|tail -n 1`
+		[ ! -n "$EXTXT" ] && EXTXT=`echo -e "$WHOIS"|egrep "([^:]*Expiration Date|Renewal date|Registry Expiry Date)"|head -n 1`
 		[ $DEBUG -eq 1 ] && echo "expire result format 2 : $EXTXT"

 		[ $DEBUG -eq 1 ] && echo "Whois expire date : $EXTXT"
ViewGit