Very simple bash snippet to something similar to “drop tables like” in MySQL

mysql shop -BNe  "show tables like '[INSERT PATTERN HERE]'" | \
while read T; do mysql shop -e "drop table \`$T\`"; done

Nothing fancy here but this is much better than installing custom libraries to do the trick …

Leave a Reply

Your email address will not be published.