当我运行sh backuptest.sh时,会出现以下错误。那么这是代码问题还是我的shell的问题?
result :
: not foundsh: 2: backuptest.sh:
: not foundsh: 4: backuptest.sh:
: not foundsh: 6: backuptest.sh:
: not foundsh: 7: backuptest.sh:
content of backuptest.sh
#!/bin/sh -e
location=`date +%Y%m%d`.sql
mysqldump -u root -proot spider_db > $location
dos2unix
命令进行转换。 - glenn jackman