Which of the following is not a filter?
A. cat
B. grep
C. wc
D. sort
E. None of the above
Answer: Option A
Solution (By Examveda Team)
Option A: catThis option is correct. The cat (concatenate) command in Unix is used to read and concatenate files and print them to the standard output. It does not filter data but rather displays the contents of files or concatenates them. Therefore, it is not considered a filter.
Option B: grep
This option is incorrect. The grep command is a filter that searches for patterns within text. It reads input and outputs only the lines that match the given pattern.
Option C: wc
This option is incorrect. The wc (word count) command is a filter that counts the number of lines, words, and characters in a file or input stream. It processes the input data and produces summarized output, making it a filter.
Option D: sort
This option is incorrect. The sort command is a filter that sorts the lines of input data based on specified criteria. It reads input data, processes it, and outputs the sorted result, thus acting as a filter.
Option E: None of the above
This option is incorrect. As explained above, the cat command is not a filter, while the other commands listed are filters.
Conclusion:
The cat command is not a filter, making Option A: cat the correct answer.
Related Questions on Unix
Which symbol will be used with grep command to match the pattern pat at the beginning of a line?
A. ^pat
B. $pat
C. pat$
D. pat^
E. None of the above
Which command is used to sort the lines of data in a file in reverse order
A. sort
B. sh
C. st
D. sort -r
E. None of the above
Which command is used to display the top of the file?
A. cat
B. head
C. more
D. grep
E. None of the above
A. cp chap?? progs
B. cp chap* progs
C. cp chap[12] /progs/*.*
D. cp chap?? /progs/*
E. None of the above

Join The Discussion