简体   繁体   中英

Globbing files having single different character in filename

I have couple of files of the format,

unit-a.test.one.two
unit-b.test.one.two
unit-c.test.one.two

and I want to move all the files to make the filename

unit-a.test.one.sample.two
and so on.

While I know that using a globbing of the type

unit-*

will match all the files, I was wondering if there is a better solution to match the filenames since this method will also incorrectly match files of the type

unit-1.txt

Which is undesirable.

为什么不使用unit-?.test.one.two

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM