Skip to content

Instantly share code, notes, and snippets.

@haykuro
Created January 12, 2015 22:15
Show Gist options
  • Save haykuro/ea4d463fc075ecae0bfc to your computer and use it in GitHub Desktop.
Save haykuro/ea4d463fc075ecae0bfc to your computer and use it in GitHub Desktop.
if [ "$(curl "reddit.com/api/username_available.json?user=$1" -L -s)" = "true" ]; then
echo "The username $1 is available on reddit.";
else
echo "The username $1 is NOT available on reddit.";
echo "Profile: http://reddit.com/u/$1";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment