Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash在正确的目录中没有看到该文件_Bash_Perl - Fatal编程技术网

Bash在正确的目录中没有看到该文件

Bash在正确的目录中没有看到该文件,bash,perl,Bash,Perl,我有这个bash脚本 ~/build/mosesdecoder/scripts/training/mert-moses.perl \ ~/factored_translation/dataset/dev.tr ~/factored_translation/dataset/dev.en \ ~/build/mosesdecoder/bin/moses unfactored/model/moses.ini \ --mertdir ~/build/mos

我有这个bash脚本

~/build/mosesdecoder/scripts/training/mert-moses.perl \
        ~/factored_translation/dataset/dev.tr ~/factored_translation/dataset/dev.en \
        ~/build/mosesdecoder/bin/moses unfactored/model/moses.ini \
        --mertdir ~/build/mosesdecoder/bin \
        --input-factor-max 4 \
        --decoder-flags="-threads all"
当我运行它时,它会给我以下错误:

./tune-model.sh:第2行: /export/students/sait/build/mosesdecoder/scripts/training/mert-moses.perl: 没有这样的文件或目录

但我确信mert-moses.pl在/export/students/sait/build/mosesdecoder/scripts/training/directory下,并且它是存在的


如何解决这个问题?

您在评论中说mert-moses.pl存在,但您的脚本查找mert-moses.perl。这可能是您的问题的根源。

坏脾气?是否尝试使用perl前缀?perl~/build/mosesdecoder/scripts/training/mert-moses.perl不能打开perl-script/export/students/sait/build/mosesdecoder/scripts/training/mert-moses.perl:没有这样的文件或目录该文件不存在。你需要告诉你多少不同的节目?ls-la/path/to/non/existing/filetry ls-F/export/students/sait/build/mosesdecoder/scripts/training,检查example.mert-moses.pl是否没有尾随空格与mert-moses.perl不同