Skip to content

Formatting bash#

Whenever I need to format bash scripts I use the mvdan's shfmt - https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd as a docker container:

sudo docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/mnt -w /mnt mvdan/shfmt:v3 -w utils/if-wait.sh

Comments