shell - Regex: Find files not ending with numeral suffix -
i need make command returns files without numeral suffix (*.0, *.123, ...)
have example 3 files:
gg.p qqq.449 rtr55
i want find these:
./rtr55 ./gg.p
i tried find them using grep. got results no effect.
find -type f | grep -v '\.[0-9]+$'
(this command returned:)
./qqq.449 ./rtr55 ./gg.p
so there regex format error. know, how fix it?
the +
operator belongs extended regular expressions. there many workarounds:
find -type f | grep -v '\.[0-9]\+$' find -type f | egrep -v '\.[0-9]+$' find -type f | grep -e -v '\.[0-9]+$' find -type f | grep -v '\.[0-9][0-9]*$'
Comments
Post a Comment