Skip to content

Instantly share code, notes, and snippets.

View AlexanderS's full-sized avatar

Alexander Sulfrian AlexanderS

View GitHub Profile
#!/bin/bash
TARGET="$HOME/test"
egrep -v "^(#|\\s*$)" ./enabledDBs | while read DATABASE ; do
mysqldump "${DATABASE}" > "${TARGET}/${DATABASE}.mysql"
done
#!/bin/bash
TARGET="$HOME/test"
DATABASES=$( cat ./enabledDBs )
for DATABASE in ${DATABASES}; do
mysqldump ${DATABASE} > ${TARGET}/${DATABASE}.mysql
done