mhmtkptn / bashExamples

bash script examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

variables/localVariables.sh

variables/defaultValue.sh

  • printProductName

variables/integerTests.sh

logging/printing.sh

  • callPrintf
  • printInColumns
  • printToVariable
  • parseWhitespaces

logging/redirectOutput.sh

terminal_/fontColor.sh

  • printInColor

execution/checkExitStatus.sh

  • echoExitStatus

execution/multiLineStatement.sh

execution/callOtherCommands.sh

execution/multiCommandOneliner.sh

  • multipleCommandsInOneLine

processes/childProcess.sh

  • createPythonProgram
  • launchChild
  • shutdownChild

processes/findProcessBeacon.sh

  • dothis

processes/processGrep.sh

  • searchForProcess

expansions/commandSubs.sh

  • commandExpansionUsingCustomIFS
  • commandExpansionUsingDefaultIFS

expansions/arithmeticExpansion.sh

expansions/processSubs.sh

expansions/variableExpansion.sh

  • useCurlyBracketsToProtectVariable
  • stringLength
  • findAndReplace

expansions/pathnameExpansion.sh

  • globFiles

codeStyle/style_v1.sh

streams_/stdInOutErr.sh

  • redirectionStdOutAndErrSeparately
  • redirectionStdOutAndErrToOneFile
  • redirectStdInFromFile

streams_/readToVars.sh

  • readLineToVars

fileSystem/fileTestExpressions.sh

  • fileIsSymbolicLink
  • fileIsExecutable

fileSystem/checkExistence.sh

  • checkPlainFile

fileSystem/forEachFile.sh

fileSystem/find

  • walk

fileSystem/find

  • findDirectories

functions/returnValue.sh

  • returnByVarExpansion
  • returnByOutputParam
  • setGlobalState
  • demoReturnByVarExpansion
  • demoReturnByOutputParam
  • demoSetGlobalState

functions/arguments.sh

  • takingFourteenArguments
  • takingThreeArguments
  • shiftArguments
  • forEachArgument
  • whileEachArgument

logic/numericLoop.sh

  • iterateOverNumbers

logic/itemLoop.sh

  • iterateOverFilePaths

logic/forLoops.sh

  • doubleGrep
  • useAwkArray

logic/whileLoops.sh

  • readLinesFromFile

logic/booleans.sh

logic/conditionals.sh

  • twoBranches
  • prt
  • combine

strings_/manip.sh

  • join
  • joins
  • len
  • stripSuffix
  • stripPrefix
  • replace
  • sub
  • toUpper
  • toLower

strings_/parameterExpansion.sh

  • defaultValueIfEmptyOrUnset
  • defaultValueIfUnset
  • alternativeValueIfSetAndNotEmpty
  • alternativeValueIfSet
  • requireVarIsSet

strings_/cutColumns.sh

  • cutColumns

strings_/singleDoubleQuotes.sh

  • singleQuoteSubstitution
  • doubleQuoteSubstitution

strings_/wordSplitting.sh

  • printArgs
  • demoDefaultIFS
  • demoCustomIFS

strings_/stringTests.sh

  • stringContains
  • stringIsDigit
  • enoughArguments

xargs/trickyFilePaths.sh

pipelines/fifoMessagePassing.sh

  • _free
  • _init
  • messageServer
  • main

pipelines/printToTee.sh

  • writeToTee

pipelines/fifoControl.sh

  • _free
  • _init
  • demoPythonWaitForBash
  • demoBashWaitForPython

pipelines/teeToMultipleOutputs.sh

  • createExec

dateAndTime/getDateTime.sh

  • formatDateAndTime

shellPipe/read_stdin.sh

  • generateSUT

applications/lineCounter.sh

applications/lineCounter_test.sh

environments/shellType.sh

environments/checkCommandExistence.sh

environments/getRunningScriptPID.sh

  • getCurrentPID
  • getCurrentPIDPython
  • getBackgroundProcessPID

environments/envVarForCommand.sh

  • reset
  • createPythonModule
  • importPythonModule
  • verifyPythonPath
  • verifyEnvVarInPython

environments/getRunningScriptPath.sh

  • getScriptPath

regexp/conditionalGroup.sh

  • ifElseGroup

/

About

bash script examples


Languages

Language:Shell 99.4%Language:Python 0.6%