On Mon, Jul 20, 2026 at 11:19:06PM +0200, Bruno Haible wrote:
> Gavin Smith wrote:
> > I don't want to
> > use a raw DEL byte in the test file (as it's hard to type in my text
> > editor), and there isn't a portable Bourne shell way to escape
> > a character AFAIK
>
> What's wrong with
>
> del=`printf '\177'`
> q='['"$del"']\{0,1\}'
>
> ?
>
> Bruno
OK, that works.
I had thought of using `...`, but I was thinking along the lines of
eval `printf 'del=\177'`
and then thought that using eval should be avoided, so I stopped there.
It's probably better to strip the bytes out anyway, as this avoids any
problems with some version grep deciding that it is a binary file and
doing something different with it.