Discard short lines?
Hello.
I have a file containing one word per line. I want to discard all lines containing words shorter than five characters. Have: Once upon a midnight dreary while I pondered weak and weary Want: midnight dreary while pondered weary Is there a Linux command which will do this? I seek a basic command, not awk, not Perl, because I haven't learned those things yet. Daniel B. Martin |
use regular expressions and any editing tool... what else?
|
See my post in your other recent thread.....
Code:
egrep ".{5}.*" filename |
Code:
bash-3.1$ grep ..... test.txt |
Knowing how you are not ready for awk and such, here is asimple bash alternative:
Code:
#!/bin/bash |
Quote:
I'll mark this one as solved. Daniel B. Martin |
All times are GMT -5. The time now is 09:14 AM. |