{"repo":"gruntwork-io/bash-commons","free":true,"listed":false,"github":"https://github.com/gruntwork-io/bash-commons","clone":"git clone https://github.com/gruntwork-io/bash-commons.git","description":"A collection of reusable Bash functions for handling common tasks such as logging, assertions, string manipulation, and more","language":"Shell","stars":807,"topics":["devops","bash","scripting","linux"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"Bash Commons This repo contains a collection of reusable Bash functions for handling common tasks such as logging, assertions, string manipulation, and more. It is our attempt to bring a little more sanity, predictability, and coding reuse to our Bash scripts. All the code has thorough automated tests and is packaged into functions, so you can safely import it into your bash scripts using source . Examples Once you have bash-commons installed (see the install instructions), you use source to import the modules and start calling the functions within them. Before you import any modules, make sure you source the bootstrap.sh file which sets some important defaults to encourage good code: Install The first step is to download the code onto your computer. The easiest way to do this is with the Gruntwork Installer (note, you'll need to replace below with a version number from the releases page): The default install location is /opt/gruntwork/bash-commons , but you can override that using the dir param, and override the owner of the install dir using the owner and group params: If you don't want to use the Gruntwork Installer, you can use git clone to get the code onto your computer and then copy it to it's final destination manually: Instance Metadata Service versions bash-commons supports both Instance Metadata Service (IMDS) version 1 and 2. Gruntwork and AWS both recommend using version 2 of the Instance Metadata Service whenever possible. Although version 1 is still supported a","default_branch":null,"files":null,"tree":[],"storefront":"/r/gruntwork-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gruntwork-io/bash-commons/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}