URL:
  <https://savannah.gnu.org/support/?111293>

                 Summary: Some more sed word boundary facts for the info
manual?
                   Group: Autoconf
               Submitter: None
               Submitted: Sa 26 Jul 2025 15:38:03 UTC
                Priority: 5 - Unprioritized
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: farb...@vodafonemail.de
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sa 26 Jul 2025 15:38:03 UTC    By: Anonymous
You have that table in the info manual on which word boundary regexps sed
groks on which platforms:

- Section "Limitations of Usual Tools"
- "sed"
- "Portable scripts should be aware of the inconsistencies and options for
handling word boundaries..."

I found that enlightening, and if only to remind me that there is no truly
portable solution for the platforms I need to support.

Here are some more facts on that ... for AIX 7.2 (I think, I'm bad a remebring
uname output), HP-UX IA64 11.31, Solaris 11 on x86-64.  All executed on a Bash
which properly expands `$'..\n..'`:

    [aixhost:~]$ uname -a
    AIX aixhost 2 7 00F7BD2A4C00
    [aixhost:~]$ which sed
    sed is /usr/bin/sed

    [aixhost:~]$ echo $'foo\noo' | sed -n '/^oo/p'
    oo
    [aixhost:~]$ echo $'foo\noo' | sed -n '/\<oo/p'
    [aixhost:~]$ echo $'foo\noo' | sed -n '/\boo/p'
    [aixhost:~]$ echo $'foo\noo' | sed -n '/[[:<:]]oo/p'
    sed: Function /[[:<:]]oo/p cannot be parsed.

    [hpiahost:~]$ uname -a
    HP-UX hpiahost B.11.31 U ia64 3184477447 unlimited-user license
    [hpiahost:~]$ which sed
    sed is /usr/bin/sed

    [hpiahost:~]$ echo $'foo\noo' | sed -n '/^oo/p'
    oo
    [hpiahost:~]$ echo $'foo\noo' | sed -n '/\<oo/p'
    [hpiahost:~]$ echo $'foo\noo' | sed -n '/\boo/p'
    [hpiahost:~]$ echo $'foo\noo' | sed -n '/[[:<:]]oo/p'
    sed: Function /[[:<:]]oo/p cannot be parsed.

    [sol11i86host:~]$ uname -a
    SunOS sol11i86host 5.11 11.4.55.138.3 i86pc i386 i86pc non-global-zone
    [sol11i86host:~]$ which sed
    sed is /usr/bin/sed

    [sol11i86host:~]$ echo $'foo\noo' | sed -n '/^oo/p'
    oo
    [sol11i86host:~]$ echo $'foo\noo' | sed -n '/\<oo/p'
    oo
    [sol11i86host:~]$ echo $'foo\noo' | sed -n '/\boo/p'
    [sol11i86host:~]$ echo $'foo\noo' | sed -n '/[[:<:]]oo/p'








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111293>

_______________________________________________
Nachricht gesendet über Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to