On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> wrote: [...] > > printf: \3: invalid escape > > Look like HP-UX's printf doesn't understand octal escape. The HP-UX one is actually OK with that. The error is from an old gnu coreutils (2.0), and it's complaining because there no leading zero, which POSIX says octal escapes have: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html """ The following <backslash>-escape sequences shall be supported: [...] "\0ddd", where ddd is a zero, one, two, or three-digit octal number that shall be converted to a byte with the numeric value specified by the octal number """ $ /usr/local/bin/printf '\03' | od -x 0000000 0300 0000001 $ /usr/local/bin/printf '\3' | od -x /usr/local/bin/printf: \3: invalid escape 0000000 -- Darren Tucker (dtucker at dtucker.net) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.