Quantcast
Channel: List files where searched term occurs more than a Threshold - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by Freddy for List files where searched term occurs more than a Threshold

$
0
0

With awk:

... | awk -F: '$NF>10{ sub(/:[0-9]+$/, ""); print }'

Split records on : and test if the last field is greater 10. If the condition is true, remove : followed by at least one digit at the end of the record. Print the (modified) record.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>