--- Begin Message ---
Subject: |
mistake with v param |
Date: |
Wed, 7 Aug 2019 17:45:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
hi to all.
for first i'm very sorry for my english..
when i'm using grep in this way to get the module path:
cd $(sudo modprobe -v --show-depends r8168 | grep -Eoi
"(\/[[:alnum:]\.\-]+){1,}" | grep -ivE "[a-z]{1}[0-9]+\.ko$")
...it return nothing
but if i switch '-v' to '-o' to test the command, it will print the right :
$ sudo modprobe -v --show-depends r8168 | grep -Eoi
"(\/[[:alnum:]\.\-]+){1,}" | grep -ioE "[a-z]{1}[0-9]+\.ko$"
$ r8168.ko
so why the '-o' option check the regular exp, but the '-v' don't do his
job??
Many Thanks
Regards
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#36960: mistake with v param |
Date: |
Thu, 2 Jan 2020 01:46:24 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
On 8/7/19 8:45 AM, Daniele Grassini wrote:
> so why the '-o' option check the regular exp, but the '-v' don't do his job??
The -v option was working as documented. It means, "select lines that *don't"
match the pattern", and since all input lines matched your pattern grep didn't
output anything.
--- End Message ---