File do.exec of Package texlive-bin
#!/bin/bash arg=${1+"$@"} case "$(exec file -bL "${arg}")" in *script\ text*) echo "${arg}" ;; *) echo "${arg}*" ;; esac
#!/bin/bash arg=${1+"$@"} case "$(exec file -bL "${arg}")" in *script\ text*) echo "${arg}" ;; *) echo "${arg}*" ;; esac