Bash Boilerplate Generator

Use this page to quickly generate a bash boilerplate script based on bashew
You will start your script with all the typical code for option parsing, dependency checking, output, logging ... already implemented. You can focus on just the new functionality and save a lot of time.

Parameters

A flag is an optional on/off parameter like -d/--debug.
An option is a optional value parameter like -e/--email [email].
A param is an obligatory unnamed value parameter.
An optional is an optional unnamed value parameter.
An multi is a multiple values parameter (can only be last parameter).

Instructions

  • Fill in your email, add the flags/options/parameters you need • press «Generate» • copy the code • paste it in your editor. • Now start coding the main part of the script
  • Scripts run on: Linux ( Ubuntu/Debian/ Redhat/ Suse), Busybox (Synology/QNAP), MacOS, Windows 10 WSL

Bash boilerplate

Based on pforret/bashew

Examples

References

  • If you often write small bash scripts to automate/facilitate repeating tasks, you don't want to lose time re-implementing option parsing, debug messages, OS detection, confirmation questions. I've been using this boilerplate bash code since 2017. The only thing missing was a configurable code generator. And here it is!