File: psql-wm

package info (click to toggle)
postgresql 7.4.7-6sarge6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 11,168 kB
  • ctags: 27
  • sloc: sh: 1,903; makefile: 337; ansic: 204; perl: 69; sed: 6; tcl: 1
file content (12 lines) | stat: -rw-r--r-- 176 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
# wrapper to enter psql from a menu entry

echo -n "Which database? "

read db

echo psql -d $db
psql -d $db
retcode=$?
[ $retcode -ne 0 ] && sleep 2
exit $retcode