Skip to content

Instantly share code, notes, and snippets.

@gerrard00
Created August 11, 2016 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerrard00/83a724b56b3126f641e6ee797505fabf to your computer and use it in GitHub Desktop.
Save gerrard00/83a724b56b3126f641e6ee797505fabf to your computer and use it in GitHub Desktop.
Show postgresql query results in terminal with a nicer format than psql
pgsql_execfile () {
clear
echo "\n"
tmpfile="$(mktemp).html"
nodemon --exec "psql -U postgres -h localhost -p 5433 -d $1 -f $2 --html -- > $tmpfile && w3m -dump $tmpfile && echo " $2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment