![](/img/trans.png)
[英]Unix Bash- How to print word count immediately after file name without line break
[英]bash- How can I remove the whole line of a txt file if its 2nd word is lower than X?
我有一个txt文件,如:
apple 200
orange 100
banana 10
在输出中,我希望他的行数低于 20:
apple 200
orange 100
您可以使用 awk:
awk '$2>=20' file
apple 200
orange 100
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.