1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env sh #MISE description="Lint shell files" #MISE alias=["l:sh", "l:shell", "lint:sh"] set -e find bin -type f -exec sh -c ' for file; do if head -n 1 "$file" 2>/dev/null | grep -qE "^#!.*(sh|bash)"; then shellcheck "$file" fi done ' sh {} +