[Bug 263478] awk: syntax error in regular expression $^

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 23 Apr 2022 00:41:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263478

            Bug ID: 263478
           Summary: awk: syntax error in regular expression $^
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: kevin@kevinlocke.name

Using the regular expression $^ as a pattern, for example by running `awk
/$^/`, causes the following error:

    awk: syntax error in regular expression $^ at 
     source line number 1
     context is
             >>> /$^/ <<< 

As far as I can tell, $^ is a valid Extended Regular Expression,[^1] as
expected by awk,[^2] although it is a bit unusual.

I encountered the bug in the ident[^3] script used by jscal-save of the Linux
Console Project and am not aware of any uses likely to affect FreeBSD users. 
Feel free to take it for what you will.

[^1]:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
[^2]:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_04
[^3]:
https://sourceforge.net/p/linuxconsole/code/ci/08ddbccfe470b346a8fc903386dea916be3a4e9f/tree/utils/ident

-- 
You are receiving this mail because:
You are the assignee for the bug.