Question 146Asked in DSSSB TGT Computer Science, 24 Jun 2023, Shift 3 (4:30 PM)

Grep command is used to:

Grep command is used to:
  1. Achange the case of alphabets
  2. Bsearch for a specific pattern from a specified file and display those lines containing the pattern
  3. Ccut the columns fields of a specified file
  4. Dredirect the output of one command to another command
Show answerHide answer

Correct answer: (B) search for a specific pattern from a specified file and display those lines containing the pattern

Explanation

grep (global regular expression print) searches files for a pattern and prints the matching lines. tr changes case, cut extracts columns, and a pipe redirects output.

From DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM)

This is question 146 of DSSSB TGT Computer Science PYQ, 24 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.