Closed jcdegiorgi closed 2 years ago
ugrep result error
I followed your tutorial and tested some of them. But this example does not seem to be correct.
Content of "myfile.txt": good diner good diner diner good Hello world
Command: ug --bool 'good|-diner' myfile.txt
Result: good good diner diner good Hello world
"Hello world" should not be here.
Yes it does. It has no diner
so it is a match! The search query matches if a line does not match diner
but if it does match diner
then it should match good
. It's a form of logical implication. Ref. Boolean algebra.
Doc missing option
To search for decimals using pattern \d+ that do not start with 0 using negative pattern 0\d+ and excluding 555: ug '\d+' -N '0\d+' -N 555 myfile.cpp
Should be: ug -e '\d+' -N '0\d+' -N 555 myfile.cpp
Yes, the -e
should be used when -N
is used.
Omitting this option gives me: ugrep: warning: \d+: No such file or directory
Same case for ug '<disp' -N '
' myfile.py To display lines that are not blank lines: ug -x '.' -N '\h' myfile.py
Gives me ugrep: warning: .*: No such file or directory
Thanks! Will fix the doc.
Hi, First of all, congratulations for this great tool!!
Test made with ugrep version: _ugrep 3.9.2 x86_64-pc-linux-gnu +avx2 +pcre2jit +zlib +lzma
ugrep result error
I followed your tutorial and tested some of them. But this example does not seem to be correct.
Content of "myfile.txt": good diner good diner diner good Hello world
Command: ug --bool 'good|-diner' myfile.txt
Result: good good diner diner good Hello world
"Hello world" should not be here.
Doc missing option
To search for decimals using pattern \d+ that do not start with 0 using negative pattern 0\d+ and excluding 555: ug '\d+' -N '0\d+' -N 555 myfile.cpp
Should be: ug -e '\d+' -N '0\d+' -N 555 myfile.cpp
Omitting this option gives me: ugrep: warning: \d+: No such file or directory
Same case for ug '\<disp' -N '\<display>' myfile.py
To display lines that are not blank lines: ug -x '.' -N '\h' myfile.py
Gives me ugrep: warning: .*: No such file or directory
Regards, Jean-Claude