cd到目录无法在shell脚本中工作

时间:2013-01-02 07:31:43

标签: shell

  

可能重复:
  Why am I getting “: No such file or directory” when trying to execute a bash script?

我有以下shell脚本..当运行它时,cd命令会一直失败并出现以下错误..有人提供输入错误吗?

#\!/bin/sh
ANDROID_ROOT="/local/mnt/workspace/AU"
cd $ANDROID_ROOT 
source build/envsetup.sh                                     
lunch 12

: No such file or directoryal/mnt/workspace/AU
./test.sh: line 4: build/envsetup.sh: No such file or directory
<username:/local/mnt/workspace/username/scripts>

1 个答案:

答案 0 :(得分:1)

线路结尾是蠢的。通过dos2unix运行它。