{"repo":"ralish/bash-script-template","free":true,"listed":false,"github":"https://github.com/ralish/bash-script-template","clone":"git clone https://github.com/ralish/bash-script-template.git","description":"A best practices Bash script template with several useful functions","language":"Shell","stars":1007,"topics":["bash","bash-script","template"],"license":"MIT","category":"cli-tools","readme_excerpt":"bash-script-template ==================== A Bash scripting template incorporating best practices & several useful functions. - Motivation - Files - Usage - Controversies - License Motivation ---------- I write Bash scripts frequently and realised that I often copied a recent script whenever I started writing a new one. This provided me with a basic scaffold to work on and several useful helper functions I'd otherwise likely end up duplicating. Rather than continually copying old scripts and flensing the irrelevant code, I'm publishing a more formalised template to ease the process for my own usage and anyone else who may find it helpful. Suggestions for improvements are most welcome. Files ----- File Description --------------- ----------------------------------------------------------------------------------------------- template.sh A fully self-contained script which combines source.sh & script.sh source.sh Designed for sourcing into scripts; contains only those functions unlikely to need modification script.sh Sample script which sources in source.sh and contains those functions likely to be modified build.sh Generates template.sh by combining source.sh & template.sh (just a helper script) Usage ----- Being a Bash script you're free to slice-and-dice the source as you see fit. The following steps outline what's typically involved to help you get started: 1. Choose between using either: 1. template.sh (fully self-contained) 2. script.sh with source.sh (source in most functi","default_branch":null,"files":null,"tree":[],"storefront":"/r/ralish","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ralish/bash-script-template/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."}