Project

General

Profile

1 8224 aaronmk
#!/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 9851 aaronmk
',/^UNLOCK TABLES;$/{
12
p
13
}')
14 8224 aaronmk
done
15
16
set -x
17
exec sed -n "${opts[@]}"