Skip to content

Instantly share code, notes, and snippets.

@evert0n
Created October 22, 2015 05:18
Show Gist options
  • Save evert0n/ce7b79b7e264ab869cea to your computer and use it in GitHub Desktop.
Save evert0n/ce7b79b7e264ab869cea to your computer and use it in GitHub Desktop.
curl -o tlds-alpha-by-domain.txt http://data.iana.org/TLD/tlds-alpha-by-domain.txt
cat tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo % > %.txt'
tail -n +2 tlds-alpha-by-domain.txt | xargs -n1 -I % -- sh -c 'echo "{\"tld\":\"%\", \"raw_data\":\"$(cat %.whois)\"}" | curl --trace-ascii /dev/stdout -d @- -H "content-type: application/json; charset=utf-8" http://192.168.3.7:3000/test/example4; echo "\nProcessing: %\n"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment