To use the external version of these programs, prefix with 'env' or
specify a full path.
shell builtin functions on do not support --version:
$ echo --version
--version
$ printf --version
bash: printf: --: invalid option
printf: usage: printf [-v var] format [arguments]
while GNU coreutils programs do support --version (and other features
mentioned in the documentation):
$ env echo --version | head -n1
echo (GNU coreutils) 8.21
$ env printf --version | head -n1
printf (GNU coreutils) 8.21
$ /bin/echo --version | head -n1
echo (GNU coreutils) 8.21
$ env echo -e '==\x3D=='
=====
$ env printf '\u263a\n'
[prints unicode smily face, if supported by your terminal]
These features often extends POSIX, and are not portable.
To restore strict POSIX compliance, use POSIXLY_CORRECT environment
variable as explained by Eric Blake: