Bug 1790227

Summary: regexp escape sequence `\"' is not a known regexp operator
Product: [Fedora] Fedora Reporter: Donald O'Dona <thomas.paulsen>
Component: gawkAssignee: Jakub Martisko <jamartis>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 31CC: ajschorr, deekej, devel, fpokorny, jamartis, ovasik
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-14 08:18:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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