# Assorted builtins: umask, hash, command, type, exec, eval, shift, set. umask 022; umask; umask -S umask u=rwx,g=rx,o=; umask umask a-w; umask umask go+w; umask umask 0777; umask; umask 022 umask bad 2>/dev/null || echo "bad umask fails" hash -r; hash sh 2>/dev/null; echo "hash=$?" hash nosuchcmd123 2>/dev/null; echo "hash missing=$?" command -v echo; command -v nosuch123; echo "status=$?" command echo via-command command -p echo via-p type type | sed 's/ (.*)//' eval 'echo "eval $((1+1))"' eval; echo "empty eval=$?" x='echo a; echo b'; eval "$x" set -- 1 2 3; shift 2; echo "$@" (shift 5) 2>/dev/null; echo "overshift=$?" set -- a b c; set -- "$@" d; echo "$#" set -u; (echo "$undefined_var") 2>/dev/null; echo "nounset=$?"; set +u set -o | grep -c '^errexit' set -a; auto=exported; set +a; sh -c 'echo "auto=$auto"' readonly ro=1; (ro=2) 2>/dev/null; echo "readonly=$?" export -p | grep -c '^export auto=' unset -v nonexistent; echo "unset missing=$?" exec 3>&1; (exec >/dev/null; echo hidden); echo shown >&3 true; false; echo $? :; echo $? times | wc -l | tr -d ' '