#!/bin/sh find "$(dirname "$0")" -maxdepth 1 -type f -perm -100 -exec \ sh -c ' if head -n1 "$1" | egrep -q "sh$"; then echo "====== CHECKING $1 ======"; shellcheck "$1"; fi ' shell {} \;