-1

我使用 Postgresql。我有命令

shp2pgsql -I -s 4269  /tmp/t/Wards.shp aa | psql  postgis;

当我输入 su postgres 并输入此命令时,它可以正常工作,但不能从 aa.sh 文件

我的 aa.sh 是

su postgres; shp2pgsql -I -s 4269  /tmp/gismanager/Wards.shp aa | psql  postgis;

有谁能够帮助我?

4

1 回答 1

0

你可能想要类似的东西

su posgres -c 'shp2pgsql… '

su命令执行特权 shell,它后面的所有内容都在shell 终止后执行。

于 2013-10-24T12:23:44.793 回答