shell脚本实现对拍 Posted on 2019-06-27 | In Ubuntu , shell 每天我苦于各种找bug,总是不知道自己哪里写错了,总感觉对于所有数据应该都已经完美了。手动对拍所有数据。不停重复着三条命令:./t > 1.in./a < 1.in./b < 1.in…… 今天我才知道,原来shell的命令脚本可以替代我完成这样枯燥的事情。我真的是愚蠢了! 1234567891011while true; do ./t > 1.in ./a < 1.in > a.out ./b < 1.in > b.out if diff a.out b.out; then printf "AC\n" else printf "WA\n" exit 0 fidone