txt, regardless of foo being in upper or lowercase letters?

Which of the following commands will find the string foo in file1.txt, regardless of foo being in upper or lowercase letters?

Which of the following commands will find the string foo in file1.txt, regardless of foo being in upper or lowercase letters?

A.
cat file1.txt | grep -i foo

B.
cat file1.txt > grep -n foo

C.
grep -i foo | file1.txt

D.
grep -n file1.txt < foo

E.
grep -n foo file1.txt

Explanation:
grep option -i tells grep to work case insensitive.



Leave a Reply 0

Your email address will not be published. Required fields are marked *