SHELL SCRIPTING

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/69

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:35 PM on 3/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

70 Terms

1
New cards
2
New cards
3
New cards
4
New cards
5
New cards
Shell Scripting
Process of automating command execution instead of running them one by one
6
New cards
Shell
A command-line interface that acts as a bridge between the user and the kernel
7
New cards
Kernel
Core part of the operating system that manages system resources
8
New cards
CLI (Command-Line Interface)
A text-based interface used to interact with the system
9
New cards
Script
A file containing a sequence of commands executed automatically
10
New cards
Bash
Bourne Again Shell; a widely used command-line shell and scripting language
11
New cards
.sh file
A file extension used for Bash scripts
12
New cards
Script Execution
Running a script from top to bottom as written
13
New cards
Text Editors
Tools like vim gedit and emacs used to create script files
14
New cards
#!/bin/sh
A line that indicates the start of a shell script
15
New cards
Comment (#)
Used to add notes in a script that are not executed
16
New cards
echo
A command used to display text or variable output
17
New cards
Case Sensitivity
File names that differ in uppercase and lowercase are treated as different
18
New cards
Valid File Characters
Letters numbers dot and underscore allowed in file names
19
New cards
Invalid File Characters
Characters like > < | : & should be avoided in file names
20
New cards
Variable
A storage location used to hold data values in a script
21
New cards
Local Variable
A variable that exists only within the current shell session
22
New cards
Shell Variable
A special variable set by the shell for system use
23
New cards
Environment Variable
A variable accessible to child processes of the shell
24
New cards
Assignment Operator (=)
Used to assign a value to a variable
25
New cards
$ Symbol
Used to access the value of a variable
26
New cards
$BASH_VERSION
A shell variable that shows the current Bash version
27
New cards
Special Variables
Predefined variables used to access script information
28
New cards
$0
Represents the filename of the current script
29
New cards
$1 $2 $n
Represents positional arguments passed to the script
30
New cards
$#
Represents the number of arguments passed to the script
31
New cards
$*
Represents all arguments as a single string
32
New cards
$@
Represents all arguments as separate quoted strings
33
New cards
$?
Represents the exit status of the last executed command
34
New cards
$$
Represents the process ID of the current shell
35
New cards
$!
Represents the process ID of the last background process
36
New cards
read
A command used to accept user input into a variable
37
New cards
Arithmetic Operators
Operators used for performing mathematical calculations
38
New cards
Addition (+)
Adds two values
39
New cards
Subtraction (-)
Subtracts one value from another
40
New cards
Multiplication (*)
Multiplies two values
41
New cards
Division (/)
Divides one value by another
42
New cards
Modulus (%)
Returns the remainder after division
43
New cards
Equality (==)
Checks if two values are equal
44
New cards
Inequality (!=)
Checks if two values are not equal
45
New cards
let
A built-in command used to perform arithmetic operations
46
New cards
Conditional Expression
A statement that evaluates to true or false
47
New cards
Square Brackets [ ]
Used to enclose conditions in shell scripting
48
New cards
Relational Operators
Operators used to compare numeric values
49
New cards
-eq
Checks if two values are equal
50
New cards
-ne
Checks if two values are not equal
51
New cards
-gt
Checks if one value is greater than another
52
New cards
-lt
Checks if one value is less than another
53
New cards
-ge
Checks if one value is greater than or equal to another
54
New cards
-le
Checks if one value is less than or equal to another
55
New cards
Conditional Statements
Used to perform different actions based on conditions
56
New cards
if statement
A control structure used to test conditions
57
New cards
else statement
Executes when the if condition is false
58
New cards
case statement
A control structure used to match values against patterns
59
New cards
esac
Marks the end of a case statement
60
New cards
;;
Ends each case option
61
New cards
*
Represents the default case option
62
New cards
Loop
A structure used to repeat a block of code multiple times
63
New cards
for loop
Used to iterate over a list of items
64
New cards
while loop
Repeats code while a condition is true
65
New cards
until loop
Repeats code until a condition becomes true
66
New cards
for in do done
Keywords used in a for loop
67
New cards
while do done
Keywords used in a while loop
68
New cards
until do done
Keywords used in an until loop
69
New cards
Iteration
One complete cycle of a loop execution
70
New cards
Automation
The use of scripts to perform tasks automatically

Explore top flashcards

flashcards
Skeletal system II / Joints
175
Updated 410d ago
0.0(0)
flashcards
Business Quiz #1
34
Updated 1104d ago
0.0(0)
flashcards
100 questions.
100
Updated 296d ago
0.0(0)
flashcards
Chapter 8
41
Updated 1029d ago
0.0(0)
flashcards
Hamlet (Acts III-V) 76 words
76
Updated 1236d ago
0.0(0)
flashcards
Year 3 EMIs
309
Updated 383d ago
0.0(0)
flashcards
Skeletal system II / Joints
175
Updated 410d ago
0.0(0)
flashcards
Business Quiz #1
34
Updated 1104d ago
0.0(0)
flashcards
100 questions.
100
Updated 296d ago
0.0(0)
flashcards
Chapter 8
41
Updated 1029d ago
0.0(0)
flashcards
Hamlet (Acts III-V) 76 words
76
Updated 1236d ago
0.0(0)
flashcards
Year 3 EMIs
309
Updated 383d ago
0.0(0)