Splitter un dump mysql avec Bash, en 1 dump par table

#!/bin/bash file=$1 # the input file directory= »$file-splitted » # the output directory output= »$directory/header » # the first file containing the header GREP= »DROP TABLE » # what we are looking for mkdir $directory # create the output directory while read line do # if the current line contains the wanted statement if [ $(echo « $line » | grep -c « $GREP ») …

Splitter un dump mysql avec Bash, en 1 dump par table Lire la suite »