HI All,
I have a file with contents like this:
apple
computer
terminal
applecomputernetworkrouterterminalrouter
network
router
applecomputernetworkrouterterminalrouter
I want to remove all lines with length greater than "18 alphabets". Hence, my output should be:
apple
computer
terminal
network
router
This is what I have tried:
awk 'length($0)>=18 filename'
I could find the length of the string but could not delete the lines.
I am using Linux with BASH.