Ⅰ shell中用find查找某個目錄下的文件,文件命名格式為*_A_B_*_*_*,怎樣把不帶後綴(.txt)的文件抽出
將結果用 egrep + 正則表達式 過濾。 set FNAME = `find ${path} -maxdepth 1 -mindepth 1 -type f -name "*_A_B_*_*_*" | egrep ^[^_]*_A_B\(_[^_.]*\){3}$`