Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #176434

Little question grep

From Hans <hans.ullrich@loop.de>
Newsgroups linux.debian.user
Subject Little question grep
Date 2017-01-08 10:20 +0100
Message-ID <sXhNT-4pM-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi all, 

I have a little problem with using grep.

The problem: 

I have a wordlist with 3,5 Mio words in ASCII. No I want filter out all words with 5,6, 
7, 8, 9 and 10 signs in seperate lists. The wordlist contains all sort of signs, like 
alphanumeric, control signs like "^", "]" and others.
So it must be same, whatever sign grep reads. I found this:

grep -o -w -E '^[[:alnum:]]{5}' file1


But it looks like it is only grepping text. I read the manual of grep, and I see, there 
are more options to chose. But I did not completely understand, if I have to chose 
every option in addition or if is there an option,which covers every kind of sign.

Would be nice, if someone could make this a little bit brighter for me.

Thank you for any hints.

Best regards

Hans


Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Little question grep Hans <hans.ullrich@loop.de> - 2017-01-08 10:20 +0100
  Re: Little question grep Reco <recoverym4n@gmail.com> - 2017-01-08 10:50 +0100
  Re: Little question grep Reco <recoverym4n@gmail.com> - 2017-01-08 10:50 +0100
  Re: Little question grep "John L. Ries" <jries@salford-systems.com> - 2017-01-08 11:30 +0100

csiph-web