File: psql

package info (click to toggle)
openssh-known-hosts 0.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 180 kB
  • sloc: sh: 193; makefile: 7
file content (23 lines) | stat: -rwxr-xr-x 407 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# psql plugin
#
# uses psql to download a TABLE (or VIEW) of the form:
# CREATE TABLE known_hosts (
#	namelist	text, # comma separated
#	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: