make renaming script better
This commit is contained in:
@@ -7,5 +7,5 @@ for post in *
|
||||
do
|
||||
title=`sed -n 's/^title: "\?\(.*\)"\?$/\1/p' $post`
|
||||
safename=`echo $title | iconv -t ascii//TRANSLIT | tr '[:upper:]' '[:lower:]' | tr -s '[:punct:] ' '-' | sed 's/-*$//g;s/^-*//g'`
|
||||
mv $post $safename.md
|
||||
mv -v $post $safename.md 2> /dev/null
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user