CH10 Flashcards

1
Q

A Pipe allows you to?

…send the same input to multiple commands.
…type multiple commands at one prompt.
…send the output of one command to another.
…send the output of a command to a file.

A

…send the output of one command to another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Which command(s) can be used to sort the lines of list.file alphabetically and display it on the screen? (Choose Two)

sort < list.file
cat list.file&raquo_space; sort
echo list.file > sort
cat list.file | sort

A

sort < list.file

cat list.file | sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. The grep command can be used with glob characters?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. Which of the following commands will display only lines that begin with start?

grep \start file.txt
grep $start file.txt
grep *start file.txt
grep ^start file.txt

A

grep ^start file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. Which of the following commands will display only lines that begin with test?

grep $test* file.txt
grep *test file.txt
grep &test file.txt
grep ^test file.txt

A

grep ^test file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Which of the following commands will display lines that contain either start or end?

egrep ‘start|end’ file.txt
egrep (start|end) file.txt
egrep start end file.txt
egrep start&end file.txt

A

egrep ‘start|end’ file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. Which option for the cut command is used to specify a delimiter?

-D
-f
=
-d

A

-d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Which option for the wc command will print the total number of words in a file?
  • l
  • C
  • L
  • w
A

-w

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. The command echo “text” > file.txt will create file.txt if it does not already exist?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. The command echo “text”&raquo_space; file.txt will not overwrite file.txt if it already exists?

True
False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly