Assessment: Pipes and Filters

Sep 30, 2014 • Kate Hertweck

From lesson here: http://software-carpentry.org/v5/novice/shell/03-pipefilter.html

MCQ:

**Which command would count the total number of lines from all files in a directory named “species”?

a. wc -l species/*
b. wc -l (ls species)
c. ls species | wc -l
d. both a and b
e. both b and c
f. both a and c

Another exercise:

Match each symbol below with its name and definition.

Symbols
|

  • <

Name
redirect input
pipe
wildcard
redirect output

Definition
use output of command on left as input for command on right
send output to file
read input from file
matches zero or more characters