正则

find . | grep -E ".*\.[m]{1,2}$" | xargs grep --color “NSLocalized” > 1.txt

 

find . | grep -E ".*\.[m]{1,2}$" | xargs grep --color "NSLocalized"

 

.*.[m]{1,2}:[\s]+

.*\.[m]{1,2}$

NSLocalizedString[\(]@\".*?il[\\)]

find . | grep -E ".*\.xls$" | xargs grep

 

find . | grep -E ".*\.[m]{1,2}$" | xargs grep --color “NSLocalized” > 1.txt

imageNamed

//查找代码中使用到的imageNamed

find . | grep -E ".*\.[m]{1,2}$" | xargs grep “.*\.png" > ~/imageNamed.txt

//查找程序文件夹中png结尾的文件

find . | grep -E ".*\.[png]$” > png.txt

//对比,删除代码中使用到的.剩余就是没有用到的

[codeSet enumerateObjectsUsingBlock:^(NSString *codeName, BOOL *stop) {

        [pngSet enumerateObjectsUsingBlock:^(NSString *pngName, BOOL *stop) {

            if ([pngName hasSuffix:codeName]) {

                [resultSet removeObject:pngName];

            }

        }];

    }];