#!/bin/sh # Detect builtin commands # This script is for development purposes. # It provide as is, do not any support. # It may change without notice. set -eu PATH=":" check() { while read -r cmd && cmd=${cmd%% *}; do if type "$cmd" >/dev/null 2>&1; then if [ -x /usr/bin/printf ]; then /usr/bin/printf "%s " "$cmd" else /bin/printf "%s " "$cmd" fi fi done echo } if ! type : >/dev/null 2>&1; then # not implements type (posh) type() { case $1 in (. | exit | type) return 0; esac $1 } fi check<