Piping Flashcards

1
Q

Piping

A

directing one command one commands output into another command input.

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

how would you take the date command and insert it into a txt document called date.txt

A

date >date.txt

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

what is a delimiter

A

A delimiter is a sequence of one or more characters for specifying the boundary between separate, independent regions in plain text or other data streams. An example of a delimiter is the comma character, which acts as a field delimiter in a sequence of comma-separated values.

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

how would you get just the day of the week using the date,pipe, and cut.

A

date | cut –delimiter “ “ –fields 1

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

what are sections of data which are broken up by delimiters

A

fields

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

what is processed first? redirections or pipes?

think of it like PEMDAS.

A

redirection

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

tee command function

A

sends standard output to two independent destinations [ex. standardin, file.txt]

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

cut the date command IOT show day of week on terminal. Show full date in separate folder labeled fulldate.txt

A

date | tee fulldate.txt | cut –delimiter “ “ –fields 1

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

cut the date command IOT show day of week in today.txt. append full date in separate folder labeled today.txt

A

redirection stops piping

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

can you pipe a standard output after redirecting it?

A

no

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

cut the date command IOT show day of week in today.txt. append full date in separate folder labeled today.txt. take snapshot of data after cut performs function.

A

date | tee fulldate.txt | cut –delimiter “ “ –field 1 | tee postcut.txt |&raquo_space;today.txt

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