Subject: Re: bug#77944: 31.0.50; M-x man on macOS fails with error

From: Michael Albinus <[email-masked]>
Date: Mon, 21 Apr 2025 18:16:40 +0200

Gerd Möllmann <[email-masked]> writes:

Hi Gerd,

> Frohe Ostern!

Naja, fast vorbei. Trotzdem auch fuer Dich viele Ostereier!

>> If it fails, does the following work?
>>
>> # sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
>
> /usr/bin/sed -e '/^[\001-\032][\001-\032]*$/d' /dev/null
> sed: 1: "/^[\001-\032][\001-\032 ...": RE error: invalid character range

So it isn't due to my change. GNU sed is required for this expression
anyway.

I could check whether GNU sed is in game. But I don't know what to do in
case it isn't: don't use this regexp silently? Or use something else?
What works for BSD sed?

>> Does 'sed --version' return something useful? Do you know which sed
>> version it is, otherwise?
>
> It doesn't have a --version. The man page says
>
> AUTHORS
>      Diomidis D. Spinellis <[email-masked]>
>
> so I guess it's the FreeBSD one.

I see. Does of the following work with BSD sed?

--8<---------------cut here---------------start------------->8---
# sed -e '/^[[:cntrl:]][[:cntrl:]]*$/d' /dev/null
# sed -e '/^[\\o0001-\\o0032][\\o0001-\\o0032]*$/d' /dev/null
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.