for f in *.ps; do
  gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dEPSCrop \
     -dProcessColorModel=/DeviceGray -sColorConversionStrategy=Gray -dOverrideICC \
     -sOutputFile="${f%.ps}.pdf" "$f"
done
