Discussion:
awk: cmd. line:2: warning: regexp escape sequence `\ ' is not a known regexp operator
(too old to reply)
hongy...@gmail.com
2022-02-17 13:43:45 UTC
Permalink
Today, on Ubuntu 20.04.3 LTS, when I'm running some tests of vasp [1], I encounter the awk warning as follows:

```
awk: cmd. line:2: warning: regexp escape sequence `\ ' is not a known regexp operator
```

The awk version is as follows:

```
$ awk --version
GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
```

I also noticed the discussion here [2], it says the following:

```
It's a problem of gawk,I downgrade gawk from 5.0.1 to 4.2.1 then this report of "awk : cmd..." disappeared.
```

However, I am not sure if this is harmful. Any hints/explanations/fixings/workarounds will be highly appreciated.

[1] https://www.vasp.at/
[2] https://github.com/KittyKatt/screenFetch/issues/627#issuecomment-512685269

Regards,
HZ
Ed Morton
2022-02-17 14:24:33 UTC
Permalink
Post by ***@gmail.com
```
awk: cmd. line:2: warning: regexp escape sequence `\ ' is not a known regexp operator
```
```
$ awk --version
GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
```
```
It's a problem of gawk,I downgrade gawk from 5.0.1 to 4.2.1 then this report of "awk : cmd..." disappeared.
```
However, I am not sure if this is harmful. Any hints/explanations/fixings/workarounds will be highly appreciated.
[1] https://www.vasp.at/
[2] https://github.com/KittyKatt/screenFetch/issues/627#issuecomment-512685269
Regards,
HZ
You showed us everything except the command you ran to produce the
warning. It's like asking your mechanic to diagnose your car trouble
without letting them see your car. Not sure how you expect us to help
you with hints/explanations/fixings/workarounds for code we can't see.

Ed.
Kenny McCormack
2022-02-17 15:27:35 UTC
Permalink
In article <sullr0$noo$***@dont-email.me>,
Ed Morton <***@gmail.com> wrote:
...
Post by Ed Morton
You showed us everything except the command you ran to produce the
warning. It's like asking your mechanic to diagnose your car trouble
without letting them see your car. Not sure how you expect us to help
you with hints/explanations/fixings/workarounds for code we can't see.
Well, it is Hongy, so you try to help at your own risk. The danger of
getting irretrievably caught in quicksand is always present.

But it is far from clear to me that there is any problem here. That there
is anything to "fix". Two facts of life are:

1) Any interpreter or compiler is free to warn about anything it wants to
warn about. Obviously, earlier versions of (G)AWK did not always complain
about "superfluous" backslashes, but this is an area where GAWK has been
making improvements recently.

2) When building FOSS stuff, sometimes you just have to accept that
warnings can happen, and you have to learn to ignore them (for the most
part). Of course, when writing your own code, you should try as hard as
possible to fix all warnings, so you get "clean compiles", but with other
people's stuff, sometimes you just have to accept that we live in an
imperfect world.

Finally, if you (i.e., Hongy) really wanted/needed to "fix" this, you'd
just have to find whatever line of code is causing the warning to be
emitted and "fix" it. Whether or not this is worth the bother, is
something you'll have to decide on your own.
--
Trump - the President for the rest of us.


Loading...