📜  postgres 输出到 bash 变量 - Shell-Bash 代码示例
📅  最后修改于: 2022-03-11 14:50:39.213000             🧑  作者: Mango
代码示例1
vartest=`psql -X -A -d $dbname -U $username -h localhost -p 5432 -t -c "SELECT gid FROM testtable WHERE aid='1'"`