shell text wrangling Flashcards

(32 cards)

1
Q

<

A

redirecting input

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

>

A

redirecting output

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

1>

A

redirecting output

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

2>

A

redirecting error

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

/dev/null

A

a special device file that discards all data written to it

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

head

A

used to print the first n lines (default 10)

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

tail

A

used to print the last n lines

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

.

A

any single character

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

[abc]

A

any of the characters in the brackets

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

[a-z]

A

any character in the range a-z

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

[^a-c]

A

means not containing a, b or c

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

(a|b)

A

either a or b

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

*

A

0 or more

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

+

A

1 or more

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

?

A

exactly 0 or 1

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

{X}

A

exactly X characters of the specific kind

17
Q

{X,Y}

A

means we want X to Y characters of the specific kind

18
Q
A

start of the line

19
Q

$

A

end of the line

20
Q

sed -g

A

replaces all matches, not only the first one

21
Q

awk -F””

A

field delimiter

22
Q

~ matches

A

!~ does not match

23
Q

$0

24
Q

$N

25
FS
input field separator
26
OFS
output field separator
27
NF
number of fields
28
NR
number of records(lines)
29
RS
record separator
30
ORS
output record separator
31
FILENAME
current file name
32