mainAutoconf - Support: sr #111293, Some more sed word boundary facts...

 
 

sr #111293: Some more sed word boundary facts for the info manual?

Submitter:  None
Submitted:  Sat 26 Jul 2025 03:38:03 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  None Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Sat 26 Jul 2025 03:38:03 PM UTC, original submission:  

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'

Anonymous

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code