Make and grep error

Page with documentation use buildsystem indicates a command to use if one wants to grep build errors:

make V=s 2>&1 | tee build.log | grep -i '[^-"a-z]error[^-.a-z]'

When I try to run it, it says about invalid end of scope. Is that regexp correct?

Regards,
Wojtek

I also verified it myself. The regexp should be fine.

Maybe more exact scene description can help, e.g. screenshot or byte-by-byte dump

I am sorry for my mistake and pasting only part that actually worked. The grep regexp on the documentation page is:

make V=s 2>&1 | tee build.log | grep -i '[^_-"a-z]error[^_-.a-z]' 

Still working on my system.

Lucky you, any idea what can cause the problem?
I am working on current Ubuntu, tried with different locales (en_US.utf8 and pl_PL.utf8) without any success.

Regards,
Wojtek

Yes, depending on

grep --version

you may have to fixup the use of the range character.

fgrep should probably get the job done as is.

1 Like