1 2 3 4 5
# $FreeBSD: releng/12.0/bin/sh/tests/builtins/printf4.0 216606 2010-12-20 23:06:57Z jilles $ set -e v=$(! printf "%d" 4wrong 2>/dev/null) [ "$v" = "4" ]