This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| script_name=$(basename "$0") | |
| print_usage() | |
| { | |
| cat <<EOF | |
| Usage: ${script_name} install ORACLE_JAVA_INSTALL_DIR [PRIORITY] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #### | |
| # Split MySQL dump SQL file into one file per table | |
| # based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
| #### | |
| if [ $# -lt 1 ] ; then | |
| echo "USAGE $0 DUMP_FILE [TABLE]" | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Splitting a sql file containing a whole database into per-table files is quite easy: | |
| # - Grep the .sql for any occurence of DROP TABLE. | |
| # - Generate the file name from the table name that is included in the DROP TABLE statement. | |
| # - Echo the output to a file. | |
| # by Marcus Pauli | |
| file=$1 # the input file | |
| directory="$file-splitted" # the output directory |