Skip to content

Instantly share code, notes, and snippets.

@trey
Created July 10, 2015 19:14
Show Gist options
  • Save trey/c41d92dbae0dfaf16af2 to your computer and use it in GitHub Desktop.
Save trey/c41d92dbae0dfaf16af2 to your computer and use it in GitHub Desktop.
See if a domain is registered.
#! /usr/bin/env ruby
#
# Save in your path as "isreg" and chmod +x. Then: isreg domain.com
#
puts `whois #{ARGV[0]}` =~ /No match for \"#{ARGV[0]}\"/mi ? "No" : "Yes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment