czds- ICANN Centralized Zone Data Service Tool |
git clone git://git.acid.vegas/czds.git |
Log | Files | Refs | Archive | README | LICENSE |
genstats (953B)
1 #!/bin/sh 2 # CZDS Stats Generator from Report - developed by acidvegas (https://git.acid.vegas/czds) 3 4 input="$1" 5 6 [ ! -f "$input" ] && echo "error: '$input' not found." && exit 1 7 8 tail -n +2 "$input" | while IFS=, read -r email tld_name status last_updated reason expire_date; do 9 clean_status=$(echo $status | tr -d '"') 10 case $clean_status in 11 "approved") echo "$email,$tld_name,$status,$last_updated,$reason,$expire_date" >> approved.txt ;; 12 "denied") echo "$email,$tld_name,$status,$last_updated,$reason,$expire_date" >> denied.txt ;; 13 "expired") echo "$email,$tld_name,$status,$last_updated,$reason,$expire_date" >> expired.txt ;; 14 "pending") echo "$email,$tld_name,$status,$last_updated,$reason,$expire_date" >> pending.txt ;; 15 "revoked") echo "$email,$tld_name,$status,$last_updated,$reason,$expire_date" >> revoked.txt ;; 16 *) echo "Unknown status: $clean_status" ;; 17 esac 18 done