昨天晚上加了个数据库自动备份的FTP脚本:backup.sh,设置了凌晨6点自动备份数据至某个FTP空间,结果今天早上来的时候发现FTP上根本没有备份的数据库文件,难道是脚本有问题?于是执行测试了一下,结果还真的执行失败,提示-bash: ./backup.sh: /bin/bash^M: bad interpreter: No such file or directory,这就怪了,这个backup.sh明明就在home目录里:
[root@hqw home]# ll
total 24
-rwxr-xr-x 1 root root 1670 Mar 11 20:29 backup.sh
drwxr-xr-x 2 root root 4096 Mar 11 19:52 cert
drwx------ 2 www www 4096 Mar 8 17:26 www
drwxrwxrwx 2 root root 4096 Mar 8 17:33 wwwlogs
drwxrwxrwx 6 root root 4096 Mar 12 16:40 wwwroot
[root@hqw home]# ./backup.sh
-bash: ./backup.sh: /bin/bash^M: bad interpreter: No such file or directory
这是怎么回事???