bashstyle
bashstyle copied to clipboard
[discuss] Suffix all bash scripts with .sh
Use .sh or .bash extension if file is meant to be included/sourced. Never on executable script.
I'm curious about the philosophy of NOT including .sh as a suffix for scripts.
The main reason I always suffix shell scripts with .sh
is to make shellcheck linting simpler. A makefile rule with find . -type f -name '*.sh' | xargs shellcheck
is the simplest way I know to ensure quality control for all scripts in a repo.