每次我运行以下bash命令时,都会出现错误:
这是代码:
sort -b ./tests/out/$scenario > $studentFile
sort -b ./tests/out/$scenario > $profFile
$(diff $studentFile $profFile)
if [ $? -eq 0 ]
then
echo "Files are equal!"
else
echo "Files are different!"
fi
Run Code Online (Sandbox Code Playgroud)
这是错误:
./test.sh: 2c2: not found
Run Code Online (Sandbox Code Playgroud)
我基本上想对两个文件进行排序,然后检查它们是否相等。我不明白的是此错误的含义以及如何消除它。任何帮助将不胜感激。
谢谢!