I have this bash script (loadShapefiles.sh) to load multiple shapefiles at a time. The script and the shapefiles are stored in the same directory. When I run the bash file with the command of bash loadShapefiles.sh, I have this error message: syntax error near unexpected token '$'do\r'' I appreciate your suggestions to fix this problem!
for f in *.shp
do
shp2pgsql -d -I -s 2913 $f rlis.`basename $f .shp` > `basename $f .shp`.sql
done
for f in *.sql
do
psql -d portland -f $f
done