shell遍历文件时,文件名有空格

#!/bin/sh

IFS=$(echo -en "\n\b")
for f in `ls | grep apk`
do
    rm -rf META-INF/MANIFEST.MF
    unzip -o "$f" >/dev/null
    md5=$(md5sum META-INF/MANIFEST.MF | awk '{print $1  }' | tr 'a-z' 'A-Z')
    echo "$f        $md5"
done

你可能感兴趣的:(shell遍历文件时,文件名有空格)