Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
#!/bin/bash USERNAME='testuser' PASSWORD='testuser' TABLENAME=$(date --date=tomorrow +"%Y-%m-%d") for a in $(cat servers.txt); do for b in 1 2 3 do for c in $(cat databases.txt); do mysql -h $a -u$USERNAME -p$PASSWORD --socket=/var/lib/mysql/mysqld$b/mysql.sock $c -e "SELECT * FROM $TABLENAME;" done done done
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!