shell / pandoc 将文件夹中的文件批量转换 docx to md
FILES=*.doc*
for f in $FILES
do
# extension="${f##*.}"
filename="${f%.*}"
echo "Converting $f to $filename.md"
`pandoc $f -t md -o $filename.md`
# uncomment this line to delete the source file.
# rm $f
done
find ./ -iname "*.doc*" -type f -exec sh -c 'pandoc "${0}" -o "${0%.doc*}.txt"' {} \;