Echo Script¶
echo-script runs a script through bash, so the script file itself does not
need the execute bit. It is one of the
bundled functions you can use from a button as
it is.
- Runs:
bash {{.path}}{{if .args}} {{.args}}{{end}} path(required): path to the script fileargs(optional): extra arguments
The function file
Write both parameter names directly on the button.
Run a script through Bash
That button runs bash /opt/scripts/cleanup.sh --verbose. Leave args out and
it runs bash /opt/scripts/cleanup.sh, because the {{if .args}} part is
skipped when the value is empty.
Related¶
script— run an executable script directly- Placeholders — how
{{if .args}}works - Custom functions — all five bundled examples