regex - Unix - File Search with Regular expression -


find . -iname "abc_v?_test.txt" -print 

which finds files

abc_v1_test.txt, abc_v2_test.txt, ..., abc_v9_test.txt 

but how can additionally abc_v10_test.txt, abc_v11_test.txt..

you can use -regex option well:

find . -regextype posix-egrep -iregex ".*abc_v[0-9]{1,2}_test\.txt$" 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -