How can I delete all of the lines in a file which contain more than a given number of letters? E.g.
bear
rabbit
tree
elephant
If I restrict it to words of 5 letters or less, the output would be:
bear
tree
$ awk 'length<=5' input.txt
bear
tree
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With