<FreeKB>
Home
About
Walkthroughs
Bash (Scripting)
Sign In
FreeKB - Bash (Scripting) articles
Bash (Scripting) articles
Command Line Options and Flags
Command line options flags arguments (case statement)
shift command line options
cron
Create a crontab entry in bash script
Email
Send a daily email (cron)
Files
Create Excel or CSV file
Functions
Getting Started with functions
if elif else then
if, elif, else, then statements
IFS (Internal Field Separator)
IFS (Internal Field Separator)
JSON
Parse JSON (python)
Lists
Getting Started with Lists
Append values to an list (+=)
Combining lists
Count values in a list
Get the first element from a List
Get the last element from a List
Removing duplicate values from a list
Sorting Lists
Loops
for loops
Move onto next value in a loop (continue)
select loops
while loops
Math
Addition and Increment (+)
Division
Multiplication
Subtraction
Printing
printing bold text
Regular Expressions
Add a leading zero to single digit numbers in Linux
append new lines to a file or variable
carriage returns (\r ^M)
do something empty lines (sed)
do something every nth match
do something every other match
do something first all or last match
do something forward slashes
do something match does/doesn't begin with pattern
do something match does/doesn't end with pattern
do something pattern match
do something range match
grep previous or next match
inline text (paste command)
new lines \n and carriage returns \r
replace string in file
Replacing whitespace
uppercase or lowercase (tr command)
wildcard character
Script interpreter
Understanding script interpreter
SSH
Getting Started with SSH
Troubleshooting
Resolve "unary operator expected"
Variables
append values to a variable (+=)
join lines in a variable
join lines in different variables
local and remote variables with SSH
remove duplicate values from a variable
remove new lines from a variable
replace values in a variable