root/inputs/GBIF/MySQL_export @ 8301
1 | 8299 | aaronmk | #!/bin/bash
|
---|---|---|---|
2 | set -o errexit |
||
3 | # Usage: env table=... [filter=...] self >out
|
||
4 | . "$(dirname "${BASH_SOURCE[0]}")"/../../lib/util.run |
||
5 | |||
6 | : "${table:?}" "${filter:=1}" |
||
7 | |||
8 | (cat <<EOF |
||
9 | SELECT * FROM $table |
||
10 | WHERE $filter |
||
11 | EOF
|
||
12 | )|echo_stdin|echo_run "time" ssh vegbiendev mysql --user=bien \ |
||
13 | --password="$(cat "$top_dir"/../../config/bien_password)" --database=GBIF \ |
||
14 | --quick
|