/usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e.
getconf ARG_MAX, on my system that'd be 2097152); example:
# try using a list that's way too long /usr/bin/printf '%s\n' $(seq $(( $(getconf ARG_MAX) * 2 ))) | tail -1
bash: /usr/bin/printf: Argument list too long
Today I'm informed that shell builtin
printfs don't have that limit; test:
printf '%s\n' $(seq $(( $(getconf ARG_MAX) * 2 ))) | tail -1
A skim of
man bash dashdoesn't seem to say much about this advantage of builtin
printf. Where is it documented?
bash) have an argument list maximum length in chars, and if so, what is that length?