开发者

grep|sort and display only the first line

开发者 https://www.devze.com 2023-02-11 19:03 出处:网络
I am trying to grep for a pattern and sort by a column and display only the first line by using the following command:

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

精彩评论

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