Created
January 25, 2013 03:35
-
-
Save zenloner/4631541 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
while getopts "i:o:" opt; do | |
case $opt in | |
i ) input="$OPTARG" ;; | |
o ) output="$OPTARG" ;; | |
esac | |
done | |
#字符串替换使用这样方式,可以方便的替换,也可以使用自带的${string/sub/replace} | |
#input=`echo "$input" | sed 's/\ /\\\ /g'` | |
#echo $input | |
#output=`echo "$output" | sed 's/\ /\\\ /g'` | |
#echo $output | |
#变量最好都使用双引号 | |
pandoc "$input" | tidy -q -i -utf8 --doctype omit --tidy-mark 0 --show-errors 0 -o "$output" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment