root/trunk/inputs/GBIF/_MySQL/MySQL_data
1 |
#!/bin/bash
|
---|---|
2 |
set -o errexit |
3 |
|
4 |
alias sed="sed -`case "$(uname)" in Darwin) echo E;; *) echo r;; esac`" |
5 |
|
6 |
test "$#" -ge 1 || set -- '.*' # include all tables |
7 |
|
8 |
opts=() |
9 |
for table in "$@"; do |
10 |
opts=("${opts[@]}" -e '/^-- Dumping data for table `'"$table"'`$/'\ |
11 |
',/^UNLOCK TABLES;$/{
|
12 |
p
|
13 |
}') |
14 |
done
|
15 |
|
16 |
set -x |
17 |
exec sed -n "${opts[@]}" |