- 论坛徽章:
- 0
|
本帖最后由 章鱼的腿 于 2013-05-29 11:28 编辑
有两个文件,内容分别如下- This is output:
- out1:
- Yes, this is out1.
- out2:
- Yes, this is out2.
- out3:
- Yes, this is out3.
- This is input:
- input1:
- yes, this is input1.
- input2:
- yes, this is input2.
- input3:
- yes, this is input3.
复制代码- This is output:
- out1:
- Yes, this is out1.
- out3:
- Yes, this is out3.
- out2:
- Yes, this is out2.
- This is input:
- input2:
- yes, this is input2.
- input1:
- yes, this is input1.
- input3:
- yes, this is input3.
复制代码 这样的文件认为是一样的, 要求就是
1) 两个文件某些行必须一致 "This is output:" 和 "This is input:"
2) 两个为一组 顺序不能乱 比如
out1:
Yes, this is out1.
3) 各个组之间可以交叉顺序.
4) input的和output的组不能互换.
请教各位大侠请教一下,能否写出一个脚本,最少是一个命令行来判断这两个文件是否相等呢. |
|