I am having a bit of a brain fart and wondering if someone might be able to help out.
I would like to have
and then exclude certain databases in a "wildcard fashion"
CONFIG_db_exclude=( 'information_schema' 'lost+found' 'test' )
CONFIG_db_exclude=("$CONFIG_db_exclude $( \
-e "show databases" \
| grep -P "_(dev|test)$" \
| sed "s/\s/' '/g;s/^/'/;s/$/'/"
Should provide a list of all databases that end in _dev AND _test
What I get when I echo out CONFIG_db_exclude
information_schema, 'Users_dev' 'adas_dev' 'adas_test' 'audit_dev' 'audit_test' 'cemt_dev' 'cemt_test'
But these databases do not get excluded.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.