Skip to content

Instantly share code, notes, and snippets.

@maeharin
Last active December 10, 2015 18:08
Show Gist options
  • Save maeharin/4472037 to your computer and use it in GitHub Desktop.
Save maeharin/4472037 to your computer and use it in GitHub Desktop.
Postgresのselect結果を、シェルからワンライナーでテキストファイルに保存する
psql -U <username> -d <dbname> -c 'SELECT * FROM users where id > 10;' -A > log.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment