Find the answer to your Linux question:
Results 1 to 2 of 2
Hi ! I need to grep a dictionary file. Only the words that contain 2 or more z's and only 1 b needs to be listed. Can't do it :/ ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Location
    Inside my head
    Posts
    13

    GREP on words with 2 or more Z's


    Hi !

    I need to grep a dictionary file.
    Only the words that contain 2 or more z's and only 1 b needs to be listed.

    Can't do it :/
    Hints?

  2. #2
    Just Joined!
    Join Date
    Oct 2010
    Location
    Inside my head
    Posts
    13
    Don't think it's possible =D ?

    --

    Well, I've found this;

    cat dutch.txt | grep -i '^[^z]*[z][^z]*[z][^z]*[z][^z]*[^b]*[b]*$'

    Don't know is it good .

    Found it !


    cat dutch.txt | grep -E 'z(.*z)+' | grep 'b'
    Last edited by Fck_; 12-21-2010 at 11:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •