Project

General

Profile

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;$/{p}')
12
done
13

    
14
set -x
15
exec sed -n "${opts[@]}"
(10-10/12)