On Sat, 29 Jan 2011 14:57:28 +0000
Etaoin Shrdlu <shr...@unlimitedmail.org> wrote:

> On Sat, 29 Jan 2011 10:01:02 -0500
> Willie Wong <ww...@math.princeton.edu> wrote:
> 
> > This is way OT, but I hope someone here can give me a quick answer:
> > 
> > I have a text-file. Individual lines of it run from 10 to several
> > thousand characters in length. Is there a simple* command that allows
> > me to only display the lines that are, say, at least 300 characters
> > long?
> 
> awk 'length >= 300' file
> 
> sed -n '/.\{300\}/p' file

Oh, and obviously

grep '.\{300\}' file

perl -ne 'print if /.{300}/' file

Reply via email to