Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Linux fgrep how to extract "only_words_in_my_language" from a big "MIXED_WORDS"  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

karlosss

    Topic Starter


    Beginner

    • Experience: Beginner
    • OS: Windows XP
    Hi everyone

    I want something to extract "only_words_in_my_language" from a big "MIXED_WORDS" file and for that i used the syntax bellow but with poor results:

    Code: [Select]
    fgrep -w -f "only_words_in_my_language.txt" "MIXED_WORDS_from_all_over_the_world" > extracted_word_of_my_country_only.txt
    That's why i'm thinking mmmm.. to ''MATCH'' the entire WORD,for better results
    For example this is a WORD in my language:


    Maimuta - 7 letters lenght,if i match the entire word the results could be:

    Code: [Select]
    [email protected]
    maimuta2016!
    Maimuta01!
    [email protected]

    if i match 6 letter the res. could be:

    Code: [Select]
    maimut
    maimutoi1
    Maimutareala01!

    So my question is how to do that??how to match the entire word or or all but not the last one?
    A regex or something for linux please
    thank you
    Godluck to all!!