NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/55979: sh single quotes removes nul characters
The following reply was made to PR bin/55979; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/55979: sh single quotes removes nul characters
Date: Sun, 07 Feb 2021 02:45:25 +0700
I just realized that when I gave the examples of other shells
processing the input with \0 chars in the script, I omitted
the bash test (it was the first I tested, and I just didn't
cut far enough back in my terminal buffer).
bash5 $ printf "x='\1\0\1'\nprintf '%%s'"' "$x"\n' | bash | hexdump -C
00000000 01 01 |..|
00000002
The "bash5 $ " prompt for all of those examples is just because I
used by bash5 test window to run these tests (which is irrelevant).
kre
Home |
Main Index |
Thread Index |
Old Index