Bug 1790227 - regexp escape sequence `\"' is not a known regexp operator
Summary: regexp escape sequence `\"' is not a known regexp operator
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gawk
Version: 31
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Martisko
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-12 19:39 UTC by Donald O'Dona
Modified: 2020-01-14 08:18 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-14 08:18:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Donald O'Dona 2020-01-12 19:39:47 UTC
Description of problem:
gawk recently fails with '\"'escape sequences, for example with screenfetch

Version-Release number of selected component (if applicable):
Name         : gawk
Version      : 5.0.1

example:
Name         : screenfetch
Version      : 3.8.0


How reproducible:
invoke screenfetch or any other script containing above mentioned expressions

Steps to Reproduce:
1. invoke screenfetch (as an example)
2. read output:
regexp escape sequence `\"' is not a known regexp operator
3.

Actual results:
screenfetch
awk: cmd. line:7: warning: regexp escape sequence `\"' is not a known regexp operator


Expected results:
no warning like all the years before

Additional info:
screenfetch only is an example!

Comment 1 Jakub Martisko 2020-01-13 09:03:56 UTC
See [1][2], it works as expected. You should use either:
echo "test line with a \\\" " | gawk '/"/ {print}'

or

echo "test line with a \\\" " | gawk '/\\"/ {print}' 

[1]: https://lists.gnu.org/archive/html/bug-gawk/2019-08/msg00051.html
[2]: https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html#Escape-Sequences

Comment 2 Donald O'Dona 2020-01-13 13:30:32 UTC
sorry, that' no solution. Who changes screenfetch? Thousands of users by themselves?

Comment 3 Andrew Schorr 2020-01-13 13:38:28 UTC
As I understand it, this is a screenfetch bug, not a gawk bug. Please consider filing
a bug against screenfetch, not gawk.

Regards,
Andy

Comment 4 Jakub Martisko 2020-01-14 08:18:00 UTC
As Andy already mentioned, if you are experiencing problems with screenfetch, you should file a bug against screenfetch (the upstream version is actually tracking this issue already [1]). Gawk is working as expected in the case of \" in regexps.

Have a nice day,
Jakub

[1]: https://github.com/KittyKatt/screenFetch/issues/627


Note You need to log in before you can comment on or make changes to this bug.