文件名:Testrun
#!/bin/sh
PROG=./puzzle
case $1 in
1) T=Tests/bad* ;;
2) T=Tests/sol* ;;
3) T=Tests/unsol* ;;
esac
if [ A$T != A ]
then
for i in $T
do
echo ================= $i ==================
$PROG < $i
done
else
echo Usage $0 "[1|2|3]"
fi
问题一: not found Testrun
解答:Ah got it, it's CRLF again - even sh
has trouble reading files with it. Run dos2unix Testrun
and then afterwards running it should work.
问题二:文件组织结构
问题二:运行方式
直接在 Terminal 中输入如下命令:
手机扫一扫
移动阅读更方便
你可能感兴趣的文章