On 2019-08-07 at 17:45 +0200, Daniele Grassini wrote:
> so why the '-o' option check the regular exp, but the '-v' don't do his 
> job??
> 

Hello Daniele


As the manual states:

> -v, --invert-match
>               Invert the sense of matching, to select non-matching lines.

With -v you are matching the *lines* that don't contain "[a-z]{1}[0-9]+\.ko$", 
not the *portion of the line* which doesn't match.

For removing lines which end that way I would recommend you to simply replace 
your grep with sed, ie.
   sed -E 's/[a-z]{1}[0-9]+\.ko$//'

(add -n and p flag to ignore lines not ending that way)

Best regards




Reply via email to