Tag: script

  • Shell script for domain searching binge

    This is an easy script to find out if a domain is available. It works with generic tld. #!/bin/bash while read i; do echo -n “$i is “; whois $i | grep -F “$(echo -e ‘No match\nNOT FOUND\n AVAIL’)” -q && echo ‘AVAILABLE! :D’ || echo ‘taken :(‘; done

  • How to rename a mysql database or table

    Here is a dirty script to rename a mysql database or table from command line. Dont for get to stop mysql service! cd /var/lib/mysql/ /etc/init.d/mysql stop # rename database… mv olddbname newdbname # …or table cd database/ mv oldname.frm newname.frm mv oldname.MYD newname.MYD mv oldname.MYI newname.MYI /etc/init.d/mysql start