From f54922269049658bdd53adadd1055e15fd490fba Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Fri, 26 Mar 2021 12:58:56 +0100 Subject: Initial commit --- tables.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tables.sh (limited to 'tables.sh') 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" -- cgit v1.2.3