> Von: Kang-Che Sung > Gesendet: Dienstag, 13. Februar 2018 04:52 > > On Tue, Feb 13, 2018 at 10:34 AM, Martijn Dekker <mart...@inlv.org> wrote: > > Op 13-02-18 om 03:09 schreef Kang-Che Sung: > >> Just wondering, why using "\z" and not "\\z" ? > >> The former doesn't seem to be a valid syntax. > > > > It is valid, though. See the POSIX specification: > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_03 > > > > ===begin quote=== > > 2.2.3 Double-Quotes > > [...] > > > > \ > > The <backslash> shall retain its special meaning as an escape > > character (see Escape Character (Backslash)) only when followed by one > > of the following characters when considered special: > > > > $ ` " \ <newline> > > ===end quote=== > > > > So, this should simply work. It worked on ash before. It also works on > > every other POSIX shell, and existing scripts rely on it. > > It says the backslash is special only when followed by the $ ` " \ > <newline> characters. > That is, \$ \` \" \\ and \<newline> are special, but none of these > includes the \z you > mentioned, so what you described is an undefined behavior.
"The <backslash> shall retain its special meaning ... only when followed ..." means that in other cases it has no special meaning. Having no special meaning does not mean undefined behavior, but rather normal behavior (as an ordinary character). -- Regards, Dietmar Schindler ________________________________ manroland web systems GmbH | Managing Director: Alexander Wassermann Registered Office: Augsburg | Trade Register: AG Augsburg | HRB-No.: 26816 | VAT: DE281389840 Confidentiality note: This eMail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any use or dissemination of this communication is strictly prohibited. If you have received this eMail in error, then please delete this eMail. ________________________________ _______________________________________________ busybox mailing list firstname.lastname@example.org http://lists.busybox.net/mailman/listinfo/busybox