From b74dff1d798ef60b3a727fe45871ee6a007129a5 Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Mon, 12 May 2014 23:54:47 +0300 Subject: [PATCH] psql: use here-strings instead of echo --- pages/common/psql.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/psql.md b/pages/common/psql.md index 45ed18ac6..1f9d30ea2 100644 --- a/pages/common/psql.md +++ b/pages/common/psql.md @@ -14,6 +14,6 @@ `psql -c '{{query}}' {{database}}` -- Run semicolon-separated *queries* against the given *database*. Note: useful in shell scripts +- Run several queries against the given *database*. Note: useful in shell scripts -`echo '{{queries}}' | psql {{database}}` \ No newline at end of file +`psql {{database}} <<< "{{query1}}; {{query2}}"` \ No newline at end of file