This function will provide information about what type of command:
ft () { t="$(type -t "$1")"; if [ "$t" = "file" ]; then if which -s "$1"; then file "$(which "$1")" else return 1 fi else echo $t fi return 0 }
It will either spit out builtin , alias , etc., a line like /bin/ls: Mach-O 64-bit x86_64 executable if the file, or nothing if not. It will return an error in the latter case.
Coroos
source share