M BUZZ CRAZE NEWS
// news

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?

1

1 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 >

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy