Ch.7 Seeing the World as the Shell Sees It Flashcards

1
Q

What does echo do

A

Display a line of text

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

What is the mechanism by which wildcards work?

A

Pathname Expansion

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

What does Tilde Expansion do? What is the Tilde?

A

When used at the beginning of a word, it expands into the name of the home directory of the named user or, if no user is named, the home directory of the current user. ~

i.e.
echo ~
/home/pi

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

What form does Arithmetic expansion use?

A

$((expression))

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

Arithmetic expression only supports what?

A

Integers (Whole numbers, no decimals)

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

Arithmetic Expansion Description for Addiction

A

+

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

Arithmetic Expansion operation for subtraction

A

-

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

Arithmetic Expansion operation for multiplication

A

*

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

Arithmetic Expansion operation for division?

A

/

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

Arithmetic Expansion operation for remainder (modulo)

A

%

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

Arithemetic Expansion operation for Expnentiation

A

**

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

What expansion creates multiple text strings?

A

Brace Expansion {}

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

What may a brace expression contain in between {}?

A

Either a comma-separated list of strings 2. a range or intergers 3. single characters.

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

What is the leading portion of a pattern to be brace expanded?

A

preamble

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

What is the trailing portion of a pattern to be brace expanded?

A

postscript

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

What happens to text inside double quotes?

A

All the special characters used by the shell lose their special meaning and are treated as ordinary characters.

17
Q

What keys are the exceptions to double quotes

A

$, \ (backslash) , ` (back-quote)

18
Q

What Expansions are still carried out regardless of double quotes?

A
  1. parameter expansion 2. arithmetic expansion, 3. command substitution
19
Q

What expansions are suppressed by double quotes?

A
  1. word-splitting 2. pathname expansion 3. tilde expansion, 4 brace expansion
20
Q

How do we suppress all expansions?

A

Single Quotes

21
Q

What is escaping characters?

A

when we don’t want a character to expand we precede a character with a backslash to selectively prevent an expansion