What does grep -cE ">" myfile.txt do?
By Jessica Wood •
I understand how to use grep; however, I am having trouble understanding the function of using ">" in my command?
11 Answer
The character > on its own doesn't have any special significance in either a basic or an extended regular expression, so both
grep -Ec ">" myfile.txt and
grep -c ">" myfile.txt count the number of lines in myfile.txt that contain the character >