Finals Flashcards

(36 cards)

1
Q

Allows for an automatic commands execution that would otherwise be executed interactively one by-one.

A

Scripting

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

Is a macro processor that allows for interactive or non-interactive command execution.

A

Shell

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

Meaning of “BASH”?

A

Bourne Again Shell

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

Command-line language. Open-source version of the Bourne Shell and was first released in 1989.

A

Bash

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

Text file containing instructions to be executed in order from top to
bottom.

A

Bash Script

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

How are script files created?

A

vim, gedit, and emacs.

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

Starts the shell script

A

!/bin/sh

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

Symbol is used for comments.

A

#

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

Used to display text and variable output.

A

echo

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

Allow a programmer to store data, alter and reuse them throughout the script.

A

Variables

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

Variable that is present within the current instance of the shell

A

Local Variable

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

Special variable that is set by the shell and is required by the shell to function correctly.

A

Shell Variables

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

Available to any child process of the shell.

A

Environment Variables

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

Filename of the current script.

A

$0

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

These variables correspond to the arguments with which a script was invoked

A

$n

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

The number of arguments supplied to a script.

17
Q

The exit status of the last command executed.

18
Q

The process number of the current shell. For shell scripts, this is the process ID under which they are executing.

19
Q

The process number of the last background command.

20
Q

Divides left-hand operand by right-hand operand and returns the remainder

21
Q

Assigns right operand in the left operand

A

= (Assignment)

22
Q

Compares two numbers, if both are same then returns true

A

== (Equality)

23
Q

Compares two numbers, if both are different then returns true

A

!= (Not Equality)

24
Q

Checks if the value of two operands are equal or not; if yes, then the condition becomes true

25
Checks if the value of two operands are equal or not; if values are not equal, then the condition becomes true.
-ne
26
Checks if the value of the left operand is greater than the value of the right operand; if yes, then the condition becomes true.
-gt
27
Checks if the value of the left operand is less than the value of the right operand; if yes, then the condition becomes true
-lt
28
Checks if the value of the left operand is greater than or equal to the value of the right operand; if yes, then the condition becomes true.
-ge
29
Checks if the value of the left operand is less than or equal to the value of the right operand; if yes, then the condition becomes true.
-le
30
Allow the programmer to implement decision making within a shell script based on certain conditions or events.
Conditionals
31
These statement saves going through a whole set of if-then-else statements
Case Statement
32
Constructs used to iterate through any given number of tasks until all items in a specified list were completed or predefined conditions were met.
Loops
33
Used to iterate through any given code for any number of supplied items in the list.
For Loop
34
Enclosed between DOand DONEis repeatedly executed only until this condition changes from false to true.
Until loop
35
Acts on a given condition. Meaning, it will keep executing code enclosed withing DO and DONE while the specified condition is true
While Loop
36