diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 13:01:17 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-05 13:01:17 +0200 |
commit | 3e94a2865e453abb1e46fdca6ede8932fa189cd9 (patch) | |
tree | 63e6d2775a32d02ddffab37a2e8623d70fcf512f /_notes | |
parent | notes/bash: update (diff) | |
download | blog-3e94a2865e453abb1e46fdca6ede8932fa189cd9.tar.gz blog-3e94a2865e453abb1e46fdca6ede8932fa189cd9.zip |
notes/bash: add script header
Diffstat (limited to '')
-rw-r--r-- | _notes/bash.html | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/_notes/bash.html b/_notes/bash.html index d15d9a7..cedfb43 100644 --- a/_notes/bash.html +++ b/_notes/bash.html @@ -5,6 +5,17 @@ layout: plain links: - {rel: stylesheet, href: 'assets/css/bash.css'} features: + - title: Script header + topics: + - do: + - | + #!/usr/bin/env bash + + set -o errexit -o nounset -o pipefail + shopt -s inherit_errexit lastpipe + dont: + - | + #!/bin/sh -e - title: Arrays topics: - title: Declaration @@ -148,7 +159,9 @@ features: {% for feature in page.features %} <h2>{{ feature.title }}</h2> {% for topic in feature.topics %} - <h3>{{ topic.title }}</h3> + {% if topic.title %} + <h3>{{ topic.title }}</h3> + {% endif %} <div class="row"> <div class="col-md-6"> {% for guide in topic.do %} |