for example, i want to match the string “abcabc” in a text file, where the two (and only two) “abc” are attached together, and no characters are in front of and at the end of “abcabc”?
if i use grep -n ‘(abc){2}’ TEST, it does not work
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Escape the parentesis:
if you want to match the string
abcabcalone on a line, as your description seems to suggest, use: