I have a script that prints a list of numbers which sometimes go up to a few Gb. For clarity I use printf %'15d as format (thouand separators). When calling this script from command-line it works as advertised:
However when (ana)cron starts it (as root) I do not get thousand separators.
I have been thinking this has to do with the shell under which this runs (printf being a built-in in bash), but (1) the script starts with #!/bin/bash, (2) /bin/sh is anyway a symlink to /bin/bash, (3) no change when I manually set shell=/bin/bash in /etc/anacrontab or /etc/crontab and (4) a printenv in the script confirms it to have bash as shell. Any clues?