make renaming script better
This commit is contained in:
parent
5947ace2e4
commit
7993779c25
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue