Which of the following Linux commands is/are used to search content from…
2023
Which of the following Linux commands is/are used to search content from files? commands: i) grep ii) egrep iii) fgrep iv) find v) tail vi) tr
Answer: A. i, ii and iii only — Option 1: i, ii and iii only The grep family of commands is specifically designed for searching plain-text data sets for lines that match a regular…
- A.
i, ii and iii only
- B.
ii, iii and iv only
- C.
v and vi only
- D.
iv only
Attempted by 161 students.
Show answer & explanation
Correct answer: A
Option 1: i, ii and iii only
The grep family of commands is specifically designed for searching plain-text data sets for lines that match a regular expression.
grep: The standard Global Regular Expression Print command.
egrep: (Extended grep) used for searching using extended regular expressions.
fgrep: (Fixed grep) used for searching for fixed strings rather than regular expressions, which is faster for simple text searches
A video solution is available for this question — log in and enroll to watch it.