bash: ./a.sh: /bin/bash^M: bad interpreter: No such file or directory

  1. # 1
  2. vim xx.sh
  3. :set ff
  4. :set fileformat=unix
  5. # 2
  6. busybox dos2unix java.sh

设置文件的访问权限

  • chmod a+x /etc/init.d/nginx (a+x ==> all user can execute 所有用户可执行)