Upon receiving your response I redid the tests. There was a mix up in my syntax when testing the escape sequences alongside `echo` which I realised going through the documentation again.
Thank you for your reply and my apologies for a false alarm. On Fri, 2 Jan, 2026, 19:37 Greg Wooledge, <[email protected]> wrote: > On Fri, Jan 02, 2026 at 16:34:59 +0530, Anshuman Khanna wrote: > > On this > > < > https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html > > > > page > > (which describes the $'...' quoting form) > > > of Bash documentation, it is mentioned that to type an ASCII character we > > can write it in its octal notation. However, there is a mistake here. > > > > The documentation says that the character must be written as `\nnn` where > > "nnn" are octal digits. The actual working requires that we type as > `\0nnn` > > where "nnn" are octal digits. Without the `\0` "nnn" isn't recognised as > an > > octal representation. > > Your claim is incorrect. > > hobbit:~$ printf %s $'\1abc' | hd > 00000000 01 61 62 63 |.abc| > 00000004 > hobbit:~$ printf %s $'\10abc' | hd > 00000000 08 61 62 63 |.abc| > 00000004 > > \1 and \10 are both recognized as octal values. This works in bash 5.2, > 5.3 and 2.05b, and though I didn't test any other versions just now, > I'm pretty confident it didn't change in between. >
