Skip to main content
Added the concise version
Source Link
terdon
  • 251.8k
  • 69
  • 480
  • 716

AWK solution

awk '{       
if (length($0) > 5)
        print $0;'} yourfile

Or, more concisely:

awk 'length > 5' file

AWK solution

awk '{       
if (length($0) > 5)
        print $0;'} yourfile

AWK solution

awk '{       
if (length($0) > 5)
        print $0;'} yourfile

Or, more concisely:

awk 'length > 5' file
Source Link
Ramesh
  • 40.4k
  • 44
  • 148
  • 222

AWK solution

awk '{       
if (length($0) > 5)
        print $0;'} yourfile