Add filter on the first line matched
Benjamin Renard

Benjamin Renard commited on 2013-11-07 08:35:49
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -74,9 +74,9 @@ case $TLD in
74 74
 		fi
75 75
 	;;
76 76
 	*)
77
-		EXTXT=`echo -e "$WHOIS"|grep "^expires:"`
77
+		EXTXT=`echo -e "$WHOIS"|grep "^expires:"|tail -n 1`
78 78
 		[ $DEBUG -eq 1 ] && echo "expire result format 1 : $EXTXT"
79
-		[ ! -n "$EXTXT" ] && EXTXT=`echo -e "$WHOIS"|egrep "([^:]*Expiration Date|Renewal date)"`
79
+		[ ! -n "$EXTXT" ] && EXTXT=`echo -e "$WHOIS"|egrep "([^:]*Expiration Date|Renewal date)"|tail -n 1`
80 80
 		[ $DEBUG -eq 1 ] && echo "expire result format 2 : $EXTXT"
81 81
 		
82 82
 		[ $DEBUG -eq 1 ] && echo "Whois expire date : $EXTXT"
83 83