/bashExamples

bash script examples {{category=shell}}

Primary LanguageShell

/

/

/

  • ifElseGroup

/

/

/

  • createMd5hashFromFile
  • createMd5hashFromString

/

  • genSha1HashFromFile

/

/

  • createFileWithRandomBytes

/

/

  • printInColor

/

  • generateSUT

/

  • setUp
  • tearDown
  • pipeMultilineTextToFile
  • pipeScriptToFile

/

/

  • countMatchingLines
  • countUnmatchingLines

/

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

/

  • cutColumns

/

/

  • singleQuoteSubstitution
  • doubleQuoteSubstitution

/

  • printArgs
  • demoDefaultIFS
  • demoCustomIFS

/

  • stringContains
  • stringIsDigit
  • enoughArguments

/

  • defaultValueIfEmptyOrUnset
  • defaultValueIfUnset
  • alternativeValueIfSetAndNotEmpty
  • alternativeValueIfSet
  • requireVarIsSet
  • setDefaultValues
  • getVariableLength

/

/

  • show

/

/

/

/

  • getScriptPath

/

/

/

  • reset
  • createPythonModule
  • importPythonModule
  • verifyPythonPath
  • verifyEnvVarInPython

/

  • getCurrentPID
  • getCurrentPIDPython
  • getBackgroundProcessPID

/

/

  • formatDateAndTime

/

/

/

/

  • createPythonProgram
  • launchChild
  • shutdownChild

/

/

  • listChildProcesses
  • printParentPid

/

/

/

/

/

/

/

  • searchForProcess

/

/

  • listPidsByProgramName

/

  • dothis

/

/

/

  • twoBranches
  • prt
  • logicalOR
  • logicalAND
  • combine

/

/

  • iterateOverFilePaths

/

  • createDirIfNotExist
  • compoundConditions

/

  • readLinesFromFile

/

  • doubleGrep
  • useAwkArray

/

  • iterateOverNumbers

/

/

  • createFromJPGs
  • doPDFShrink

/

/

  • createExec

/

  • _free
  • _init
  • messageServer
  • main

/

  • _free
  • _init
  • demoPythonWaitForBash
  • demoBashWaitForPython

/

  • writeToTee

/

/

/

/

/

/

  • checkPlainFile

/

/

  • setUp
  • buildSUTProgram
  • modifyArtifactDirectory
  • copyArtifactToDest
  • copyArtifactDirectoryToDest
  • tearDown

/

  • getAbsolutePath
  • getAbsolutePathByVar

/

/

/

/

/

  • walk

/

  • findDirectories
  • createFindPatterns

/

/

  • fileInfo

/

  • fileIsSymbolicLink
  • fileIsExecutable

/

/

/

/

  • compressSingleFile
  • compressMultipleFilesSeparately

/

/

  • setUp
  • tearDown
  • compressDirectory
  • decompressDirectory

/

/

/

  • printProductName

/

/

/

/

/

/

  • validate

/

/

  • echoExitStatus

/

/

  • setUp
  • build
  • verifyBuild

/

  • multipleCommandsInOneLine

/

/

  • implicitCast

/

  • __run

/

/

/

/

/

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

/

  • takingFourteenArguments
  • takingThreeArguments
  • shiftArguments
  • forEachArgument
  • whileEachArgument

/

/

/

/

/

  • globFiles

/

/

  • useCurlyBracketsToProtectVariable
  • stringLength
  • findAndReplace

/

/

  • commandExpansionUsingCustomIFS
  • commandExpansionUsingDefaultIFS

/

  • redirectionStdOutAndErrSeparately
  • redirectionStdOutAndErrToOneFile
  • redirectStdInFromFile

/

  • readLineToVars

/

  • callPrintf
  • printInColumns
  • printToVariable
  • parseWhitespaces

/

/

/

/