CNIT 340 Substitution

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

what are the four types of substitution?

filename substitutuion

varibale substitution

command substitution

arithmetic substitution

2
New cards

what is filename subsitution also known as?

globbing

3
New cards

what is the process of globbing?

expanding a strign with some meta-characters (wild characters) to a list of filenames

4
New cards

globbing is case sensitive (t/f)

true

5
New cards

what are the meta characters?

*, ?, [character set]

6
New cards

what does * do?

matches any character zero or more times

7
New cards

what does ? do?

matches any character one time

8
New cards

what does [character set] do?

matches the characters stated one time

9
New cards

match globbing will match every filename, even the hidden ones (t/f)

false

10
New cards

what is the output of 'ls *'

return all visible filenames

11
New cards

the * globbing can be placed as a prefix and suffix (t/f)

true

12
New cards

how does ? globbing compare to * globbing?

? globbing is basically * matching, but for one charater

13
New cards

examining the command 'ls Chapter?.doc'

would 'Chapter1.doc' or 'Chapter01.doc' match?

Chapter1.doc (? globbing does NOT match zero charaters)

14
New cards

you can use multiple ?? for globbing (t/f)

true

15
New cards

examining the command 'ls Chapter??.doc'

would 'Chapter1.doc' appear in the match?

no, but Chapter01.doc would

16
New cards

if ? globbing does not match anything, what does the shell assume?

the filename contained a '?' character (Chapter?.doc)

17
New cards

[character set] match globbing matches zero characters (t/f)

false

18
New cards

examine the command 'ls Chapter0 [0123] .doc'

what would an output be?

Chapter01.doc

Chapter02.doc

Chapter03.doc

etc

19
New cards

how would you negate a set of characters?

ls [!a-z]*

20
New cards

what would ls [!a-z]* match?

any file without a lowercase letter

21
New cards

default value substitutuion is defined as what?

$[ :- }

22
New cards

default value assignment substitutuion is defined as what?

${:=}

23
New cards

substitute when set is defined as what?

${:+}

24
New cards

null value error is defined as what?

{:?}

25
New cards

the shell can perform simple integer math (t/f)

true

26
New cards

solution for integers will only keep the integer portion (t/f)

true