Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Problem with "grep" command

    I want to search a string with grep command that print every line that the file '' with the symbol '&', followed by the string 'whois' followed by a '.', then four other characters, followed by another a '.', followed by one or more characters, followed by ';;', followed by the end of the line.

    I have given following command

    egrep '&whois\..+\..+;;$'

    and its working. but I am unable to select 4 charachters followed by '.' character.
    the command should be like this

    grep -E '&whois\..{4}\..+;;$'

    but for me its not working. tell me its solution.

  2. #2
    Can you please post me a sample output of first Command "egrep '&whois\..+\..+;;$'"

    Can also try with grep -E "&whois\..{4}\..+;;$"

    If you want to know more on grep u can Check ou the below linux.
    http: //

Posting Permissions

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