Actual_dir=`pwd`
Date=`date +%Y-%m-%d`
Databases=`mysql -u root -pPASSWORD -e "SHOW DATABASES;" | grep -Ev "(mysql|information_schema|performance_schema|database|sys)"`
for bbdd in $Databases; do
echo $bbdd
mysqldump -u root -pPASSWORD $bbdd > "$Actual_dir/mysql-bak-all/$Date_$bbdd.sql"
done
Y esto es todo amigos, feliz programming
Saludos
Alex.