【发布时间】:2012-11-29 03:10:33
【问题描述】:
我正在尝试根据第一个输出到文件的唯一行数 字段,输入行如下所示:
Forms.js /forms/Forms.js http://www.gumby.com/test.htm 404
Forms.js /forms/Forms1.js http://www.gumby.com/test.htm 404
Forms.js /forms/Forms2.js http://www.gumby.com/test.htm 404
Interpret.js /forms/Interpret1.js http://www.gumby.com/test.htm 404
Interpret.js /forms/Interpret2.js http://www.gumby.com/test.htm 404
Interpret.js /forms/Interpret3.js http://www.gumby.com/test.htm 404
到这样的事情:
3 Forms.js /forms/Forms.js http://www.gumby.com.mx/test.htm 404
3 Interpret.js /forms/Interpret.js http://www.gumby.com.mx/test.htm 404
我一直在尝试各种 sort 和 uniq 组合,但还没有成功。 我可以使用整行获得不同的行,但我只想要第一个字段。 我目前正在使用cygwin。我不识字,但我 怀疑这是要走的路。谁有方便的解决方案?
【问题讨论】: