1 |
On Sat, 29 Jan 2011 14:57:28 +0000 |
2 |
Etaoin Shrdlu <shrdlu@×××××××××××××.org> wrote: |
3 |
|
4 |
> On Sat, 29 Jan 2011 10:01:02 -0500 |
5 |
> Willie Wong <wwong@××××××××××××××.EDU> wrote: |
6 |
> |
7 |
> > This is way OT, but I hope someone here can give me a quick answer: |
8 |
> > |
9 |
> > I have a text-file. Individual lines of it run from 10 to several |
10 |
> > thousand characters in length. Is there a simple* command that allows |
11 |
> > me to only display the lines that are, say, at least 300 characters |
12 |
> > long? |
13 |
> |
14 |
> awk 'length >= 300' file |
15 |
> |
16 |
> sed -n '/.\{300\}/p' file |
17 |
|
18 |
Oh, and obviously |
19 |
|
20 |
grep '.\{300\}' file |
21 |
|
22 |
perl -ne 'print if /.{300}/' file |