Skip to content

Instantly share code, notes, and snippets.

@jjnilton
Created April 5, 2017 22:15
Show Gist options
  • Save jjnilton/d66257eb2e3101ef235423239859bc17 to your computer and use it in GitHub Desktop.
Save jjnilton/d66257eb2e3101ef235423239859bc17 to your computer and use it in GitHub Desktop.
script to convert multiple docx files to html using pandoc
#!/bin/bash
for file in "$PWD"/*
do
filename="$file"
echo "converting $filename to ${filename%.*}.html"
if [ "$file" != "$PWD/${0##*/}" ];then
pandoc "$filename" -o "${filename%.*}.html"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment