blob: aa210d2093f0d5bc2ccb08065ecf50a5eb12ac2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/dash
# psql plugin
#
# uses psql to download a TABLE (or VIEW) of the form:
# CREATE TABLE known_hosts (
# namelist text, # comma seperated
# type text,
# key text
# );
# alternatively only one column with spaces between those three
#
# ENVIRONMENT VARIABLES:
# TABLE table to download
# used by psql:
# PG* see psql(1)
#
set -e
psql -F ' ' -Atc "SELECT * FROM ${TABLE}" > new
# vim:set ft=sh:
|