I don't know why you'd need a separate (non builtin, go) package. `file` does this just fine:
if [ -d .git ] ; then files_to_check="$(git ls-files | xargs file | grep -e 'POSIX shell script' | cut -d : -f1)" else files_to_check="$(find . -type f -exec file {} \; | grep -e 'POSIX shell script' | cut -d : -f1)" fi
(from https://github.com/Winetricks/winetricks/blob/master/tests/shell-checks#L49)
I don't know why you'd need a separate (non builtin, go) package. `file` does this just fine:
if [ -d .git ] ; then to_check= "$(git ls-files | xargs file | grep -e 'POSIX shell script' | cut -d : -f1)" to_check= "$(find . -type f -exec file {} \; | grep -e 'POSIX shell script' | cut -d : -f1)"
files_
else
files_
fi
(from https:/ /github. com/Winetricks/ winetricks/ blob/master/ tests/shell- checks# L49)