Quote:
Originally Posted by swordfish
Code:
DBS=`echo "show databases;" | mysql -u root -pmypassword | tail -n +2`
I think this is what you need, $DBS will contain a list you can loop through and do you stuff.
HTH
|
Or use this one
Code:
DBS=`mysql -u root -pmypassword -e 'show databases' | tail -n +2`