logo

Crowdly

The grep command prints out lines of a file that match a specified pattern. The ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

The grep command prints out lines of a file that match a specified pattern. The '-v' flag inverts the behaviour so the grep command prints out lines of a file that do not match the specified pattern.

Given a file foo.txt, suppose

  grep -v hello foo.txt

prints 5 lines of text, and

  grep hello foo.txt

prints 3 lines of text,

then how many lines are there in the file foo.txt?

More questions like this

Want instant access to all verified answers on moodle.gla.ac.uk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!