I am practicing using grep and trying to find the line with two occurrences of
why in a file called learn_grep.txt. I thought I typed the proper commands, but according to my results I am not. Here is what the line looks like in the text file:
I type this into bash:
Code:
usr@terminal:$ grep \(why\).*\1 learn_grep.txt
It does not echo any line in learn_grep.txt.
I tried to look it using google.com/linux and linuxquestions.org but I could not find my problem.
Does anybody know what I am doing wrong?