>>900
パイプとコマンド置換を混同してるね

× type -p "$file" | md5sum> cach/"$file".txt

○ md5sum `type -p "$file"` > cach/"$file".txt