开发者

grep|sort and display only the first line

I am trying to grep for a pattern and sort by a column and display only the first line by using the following command:

grep "BEST SCORE" Result.txt | sort -nk 4 | "display only first line"

I don't want to save the grep neither thesort result i开发者_运维技巧nto a file.


grep "BEST SCORE" Result.txt|sort -nk 4|head -1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜