I use a bash script (similar to following example) to update tables.
psql -v passed_in_var=\'some_value\' -f script_name ....
Is it possible to pass a value back from psql to the bash script?
Thanks,
Paul Cunningham
Paul Cunningham wrote:
> I use a bash script (similar to following example) to update tables.
>
> psql -v passed_in_var=\'some_value\' -f script_name ....
>
> Is it possible to pass a value back from psql to the bash script?
You can pass the textual output of psql back with backticks:
echo `psql ...`
--
Richard Huxton
Archonet Ltd
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.