Simple Filters in UNIX

The section contains multiple choice questions and answers on simple filters which are are programs that take plain text(either stored in a file or produced by another program) as standard input, transforms it into a meaningful format, and then returns it as standard output.

Start Quiz

Filter’s are a category of commands that take the advantage of shell redirection feature.

True False

Which command is used for preparing a file for printing?

cd cat print pr

pr command adds ____ lines of margin at the top and bottom.

5

4

2

1

Which option is used with pr command to suppress the header and footers?

-p -k -t -n

___ operator is used with pr command to start printing from a specific page.

# + &

By default, how many lines are displayed using the head command?

5 10 4 20

Which option is used with the head command to specify line count to display?

-a -h -n -o

Which option is used with pr command for printing multi-columnar output?

-P

-K

-D

-Pr

Which command is used for displaying the beginning of a file?

Pr

Head

Begin

lp

___ command is used for displaying the end of the file.

Head

Tail

lp

Pr

Quiz/Test Summary
Title: Simple Filters in UNIX
Questions: 10
Contributed by:
Steve