最近我安装了一个名为“范式”的程序。在程序路径(/ home/hora/Paradigm /)中有一个目录“testdata”(/ home/hora/Paradigm/testdata),其中包含一个运行应用程序示例测试的shell脚本。第一次安装程序我能够运行shell脚本(runtests.sh),但现在我尝试运行它,但得到“没有这样的文件或目录”的错误,虽然错误提到的文件存在。我相信这个问题是由于我对linux的知识不足而引起的,我们将不胜感激。要显示的情况:在linux中没有这样的文件或目录错误
[email protected]:~/Paradigm/testdata$ ./runtests.sh
Testing node splitting [1/2], should take seconds
diff: needs_split_1.out: No such file or directory
./runtests.sh: line 6: ../pathwaytab2daifg: No such file or directory
但是如果我列出目录的内容所提到的文件有:
[email protected]:~/Paradigm/testdata$ ls
complex_family_pathway.tab needs_split_1.cfg needs_split_2.out runtests.sh small_disconnected_pathway.tab
complex_family_pathway.tab.out needs_split_1.out needs_split_2.pathway.tab
然后:
[email protected]:~/Paradigm$ ls
common.h configuration.o
evidencesource.o helperScripts makefile
pathwaytab2daifg.cpp pathwaytab.h test1 configuration.cpp
evidencesource.cpp externVars.cpp main.cpp paradigm
pathwaytab2daifg.o pathwaytab.o testdata configuration.h
evidencesource.h externVars.o main.o pathwaytab2daifg
pathwaytab.cpp README.mediawiki
这是脚本的内容(问题部分):
#!/bin/bash
set -o pipefail
cd
echo Testing node splitting [1/2], should take seconds
../pathwaytab2daifg needs_split_1.pathway.tab needs_split_1.cfg \
| diff needs_split_1.out - || exit 1
您的错误消息抱怨'../pathtabtabdadagg',它是**相对**路径。在这之前你是否在脚本中更改当前目录?如果是这样,请在执行此行之前更换,或将其更改为绝对路径。 – jam
“pathwaytab2daifg”比我尝试在正确的位置运行脚本的位置高出一级,而且我没有改变任何事情。一切都在他们的位置,但我得到这个错误。 – hora
@Jost我添加了脚本 – hora