2013-10-24 269 views
-1

我使用Postgresql。我有命令从Shell脚本运行Postgres命令

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

当我键入Postgres的苏并输入以下命令它工作正常,但是从aa.sh文件不

我aa.sh是

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

任何人可以帮助我吗?

回答

0

你可能要像

su posgres -c 'shp2pgsql… ' 

su命令执行特权shell,终止外壳执行一切跟随它。