aboutsummaryrefslogtreecommitdiff
path: root/tables.sh
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2021-03-26 12:58:56 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2021-03-26 12:58:56 +0100
commitf54922269049658bdd53adadd1055e15fd490fba (patch)
treec00a8a1f731d1d95e3f33f288527f2215b509f1a /tables.sh
downloadacme-scripts-f54922269049658bdd53adadd1055e15fd490fba.tar.gz
acme-scripts-f54922269049658bdd53adadd1055e15fd490fba.zip
Initial commit
Diffstat (limited to 'tables.sh')
-rwxr-xr-xtables.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tables.sh b/tables.sh
new file mode 100755
index 0000000..0b4e4a4
--- /dev/null
+++ b/tables.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+command="\dt"
+if [ ! -z $1 ]; then
+ command="\d $1"
+fi
+
+IFS=''
+while read -r LINE || [ -n "$LINE" ]; do
+ command="\d $LINE"
+done
+
+export PGPASSWORD=postgres
+psql -U postgres -h 192.168.1.237 selling_svil -c "$command"