Skip to content

Instantly share code, notes, and snippets.

@pm98zz-c
Created July 11, 2017 14:09

Revisions

  1. Pascal Morin created this gist Jul 11, 2017.
    3 changes: 3 additions & 0 deletions test.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    mysql -uroot -e "show tables FROM drupal;" | grep -v '^Tables_in_' | { while read -r table ;\
    do mysql -uroot -e "CREATE TABLE new_build.$table AS SELECT * FROM drupal.$table;"; \
    done ; }