If you have Homebrew installed, check out homebrew-shell-scripts for an easy way to install and use these scripts. Otherwise, clone the repo and place these somewhere in your path.
A simple wrapper for running mdls -name kMDItemContentType -name kMDItemContetTypeTree -name kMDItemKind <file>. Particularly (and only) useful for finding the Uniform Type Identifier, commonly referred to as UTI of a file.
uti.sh README.md
kMDItemContentType = "net.daringfireball.markdown"
kMDItemContentTypeTree = (
"net.daringfireball.markdown",
"public.plain-text",
"public.text",
"public.data",
"public.item",
"public.content"
)
kMDItemKind = "Markdown Document"