Computer Science - Unix - Discussion

Discussion :: Unix - Section 2 (Q.No.4)


Which of the following is not a filter?

[A]. cat
[B]. grep
[C]. wc
[D]. sort
[E]. None of the above

Answer: Option E


No answer description available for this question.

Barthlomew I C said: (Apr 18, 2014)  
What is a filter? And give examples of it.

Vidur said: (Nov 18, 2014)  
How can CAT be a filter, as far as I am concerned it is used to print the data out to the console.

Balu said: (Feb 24, 2015)  
Yes CAT command just display the data of the file. How can CAT be a filter. It doesn't sort data in the file.

Fareen said: (Mar 12, 2015)  
Yes, I agree with the above comments cat is only used to display the contents of the file, so it's not a FILTER.

Gunsree said: (Mar 12, 2015)  
No @Fareen you are wrong cat is also a filter. So the answer is none of the above.

Lata said: (Jun 1, 2015)  
A filter is a program which can receive a flow of data from std input, process (or filter) it and send the result to the std output.

Numerous filters are included on Unix-like systems, a few of which are awk, cat, comm, csplit, cut, diff, expand, fold, grep, head, join, less, more, paste, sed, sort, spell, tail, tr, unexpanded, uniq and wc.

Sainaveen said: (May 24, 2016)  
The cat is a filter because it filters all the files to find a particular file name.

Debanuj said: (May 29, 2016)  
The cat is one of the most frequently used commands on Unix-like systems.

It is best known for its ability to display the contents of files rather than for its ability to transform them, and thus it might not initially appear to fall into the category of a filter.

However, it has the two additional (and not unrelated) functions of creating files and concatenating (i. e. combining) copies of them, which clearly makes it a filter.

In the next example, cat combines copies of file1, file2, and file3, and this is piped to wc, a filter which by default writes the number of bytes, words, and lines to the display monitor:

cat file1 file2 file3 | wc

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.