Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?
Which of the following commands finds all lines in the file operating-systems.txt which contain the term linux, regardless of the case?
The correct command to find all lines in the file operating-systems.txt that contain the term linux, regardless of case, is grep -i linux operating-systems.txt. The -i option in grep stands for 'ignore case', allowing it to match 'linux', 'Linux', 'LINUX', etc.
The -i switch in the grep command is used to perform a case-insensitive search. When you use -i with grep, it tells grep to ignore the distinction between uppercase and lowercase letters while searching for a pattern in the input text.
Thanks
# grep -i linux file.txt Linux LINux linux
- i ignore the case sensitivity.
C is correct