Ⅰ shell中用find查找某个目录下的文件,文件命名格式为*_A_B_*_*_*,怎样把不带后缀(.txt)的文件抽出
将结果用 egrep + 正则表达式 过滤。 set FNAME = `find ${path} -maxdepth 1 -mindepth 1 -type f -name "*_A_B_*_*_*" | egrep ^[^_]*_A_B\(_[^_.]*\){3}$`