NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/59453 (sed 's/^/\x23def/' output '=ef' instead of '#def')
The following reply was made to PR bin/59453; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/59453 (sed 's/^/\x23def/' output '=ef' instead of '#def')
Date: Mon, 2 Jun 2025 12:12:16 +0200
This seems to be not documented anywhere. The gnu sed documentation does
not specify it clearly, but gnu sed takes one or two hex characters after
\x.
> echo | gsed 's/^/\x1023def/' | hexdump -C
00000000 10 32 33 64 65 66 0a |.23def.|
> echo | gsed 's/^/\x1t023def/' | hexdump -C
00000000 01 74 30 32 33 64 65 66 0a |.t023def.|
We should document it as GNU sed compatible extension (maybe borrowing
the portability warning from sh(1)).
Martin
Home |
Main Index |
Thread Index |
Old Index