Shell scripts to delete old Jenkins builds
Examples of shell scripts to delete old Jenkins builds based on dates, size, and excluded filters.
Examples of shell scripts to delete old Jenkins builds based on dates, size, and excluded filters.
This post shows an example of a bash script which creates a Docker container, copies a bash script to it, executes that script from the host, and saves its output on the host machine.
Examples of how to check if a Docker container with a given name exists and get its status in bash scripts.
A straightforward way to use parameters in a Bash script is to execute the script with the parameters values listed after the script file name and to use these values in the script via ${1}..${n}
variables, where n is the number of the parameters.
An example of how to replace some sequence of characters by another sequence constructed dynamically, using a variable value, in all files located in the current directory.