1
當我運行SH backuptest.sh,下面的錯誤來。所以它是用代碼或我的殼發出not foundsh:2:exectutin 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
ls/bin/sh能行嗎? – SMA 2014-10-31 10:01:31
看起來像你的腳本包含DOS風格的行尾。嘗試'dos2unix' – 2014-10-31 11:08:57
yes/bin/sh的作品 – user2782906 2014-10-31 11:47:59