Quote:
Originally Posted by whocares357
Hm, I must have some hidden characters in the text file because my output consists of all four character lines. Is there any way to reveal hidden characters (in vi or cat)? Nevermind: set list in vi.
Edit: Thank you very much. I actually simplified the expression with '/^.\{5\}$/p'.
|
Hi,
to further "simplify" you could use sed's -r option:
Code:
sed -r -n '/^.{5}/p' infile
This way you do not have to escape the curly braces {}. Ok, it is not really simplifying but readability improves - especially if you have to use a lot of {()} ...