BASH Flashcards

1
Q

How do you comment?

A

Use #

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

How do you delimit statements

A

With semicolon ;

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

What operator will run commands in the background

A

The & symbol

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

How do you continue a command with a newline?

A

Use backslash \

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

What are the 2 options for declaring variables

A

-r for read only and -x for global

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

How does BASH know where to look for programs

A

With the $PATH variable containing absolute pathnames, delimited by : .

If this ends with : , then the working directory is considered part of the path.

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

What is something you have to consider regarding truth statements?

A

0 is true, and anything else is false (bruh)

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

How do you get the number of commands line arguments

A

With the $# variable

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

How do you get the current options set

A

$-

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

How do you get the process ID of the current shell (but not subshell)

A

$$

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