Bash - declare and loop over array
How to declare an array and loop over it? # declare array: https://www.gnu.org/software/bash/manual/html_node/Arrays.html declare -a myArray=("Linux Mint" "Fedora" "Red Hat Linux" "Ubuntu" "Debian...
How to declare an array and loop over it? # declare array: https://www.gnu.org/software/bash/manual/html_node/Arrays.html declare -a myArray=("Linux Mint" "Fedora" "Red Hat Linux" "Ubuntu" "Debian...
My docker container doesn’t have a tool (e.g., telnet) installed. How do I run that tool without installing it in the container? That tool (say, telnet) is already available on the host. nsenter a...
For small projects, I’d still like to handle their credentials carefully while keeping the effort small. Since KeePass is a low-effort Password Manager, why not get automation tools to read creden...
Trying to write a multi-line string in GitHub Actions output variable $GITHUB_OUTPUT returns the error, Unable to process file command 'output' successfully. GitHub Actions documentation shows us ...
When setting environment variables Packer, make sure there’s no space in between. If there’s a whitespace, Packer passes on that whitespace within the value of the env var. Using # as a marker, we...
While trying to understand this line from the utilities that GitHub uses for their GitHub Runners, it occurred to me that environment variables are defined in different contexts that affects how lo...
How do I create a json structure from scratch using only jq? The command line option --arg name value passes a value to the jq program as a predefined variable… so --arg foo 123 will bind $foo ...
Many times, I want to know what the Json payload looks like when an event occurs on GitHub that triggers a GitHub Actions workflow. In the past, I used to setup a Webhook that sends the json paylo...
I preferred solution 3 listed on devops schools because it builds on other TILs I alread have, such as Powershell - basic auth in Authorization header The tricky part was using the InFile option. ...
Sometimes I need to read multiple string values from json, and save them into their own variables as a pre-processing step. Assigning multiple variables in Bash using process substitution, i.e., &...