From: Darren Tucker Date: Mon, 18 May 2020 23:22:01 GMT Subject: Re: [PATCH 1/7] Redirect grep's stderr top null too. Message-ID: In-Reply-To: <20200518153025.GD1980@danh.dev> On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh 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 -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.