monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 812ac9caab2598a7eb55b61fe0f4991b354bcdcf
parent 041a2d14fa4dc88a9b0be196586d03cab85fb982
Author: z3bra <willy@mailoo.org>
Date:   Sat, 14 Feb 2015 00:54:13 +0100

Better conversion of post titles

Diffstat:
post.sh | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/post.sh b/post.sh @@ -4,7 +4,7 @@ read -p "Post title: " title # use post title to name the file -file=`echo ${title}| sed "s/\s\+/-/g;s/./\L&/g;s/[,.?!;\"']//g"`.txt +file=`echo ${title}| tr -d ",.?!;\"'" | sed "s/\s\+$//;s/\s\+/-/g;s/./\L&/g"`.txt test -z "$file" && exit 1