FreeKB - Bash Shell Scripting articles
Bash Shell Scripting articles

ArraysGetting Started with ArraysAppend values to an array (+=)Command Line Options and FlagsCommand line option and flags (case statement)EmailSend a daily email (cron)FilesCreate Excel or CSV fileFunctionsGetting Started with functionsif elif else thenif, elif, else, then statementsLoopsfor loopsselect loopswhile loopsMathAdditionDivisionMultiplicationSubtractionPrintingprinting bold textRegular ExpressionsAdd a leading zero to single digit numbers in Linuxappend new lines to a file or variablecarriage returns (\r ^M)do something empty linesdo something every nth matchdo something every other matchdo something forward slashesdo something last matchdo something match does/doesn't begin with patterndo something match does/doesn't end with patterndo something pattern matchdo something range matchgrep previous or next matchinline text (paste command)newlines \nreplace string in fileuppercase or lowercase (tr command)whitespace \swildcard characterScript interpreterUnderstanding script interpreterSSHGetting Started with SSHVariablesappend values to a variable (+=)join lines in a variablejoin lines in different variableslocal and remote variables with SSHremove duplicate values from a variableremove new lines from a variablereplace values in a variable