From 64c731759fa1d17f982456e03f4544defb390248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 3 May 2020 15:11:49 -0500 Subject: [PATCH] new.sh: remove slash of string title --- new.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/new.sh b/new.sh index abedc91..6634f52 100644 --- a/new.sh +++ b/new.sh @@ -13,6 +13,8 @@ printf '%s' "Enter Category: " read -r category="$REPLY" +title="${title/\//}" + # Slug | lowercase, without accent mark lug=$(printf '%s' "${title// /-}") slug=$(echo "$lug" | sed 'y/áÁàÀãÃâÂéÉêÊíÍóÓõÕôÔúÚñÑçÇ/aAaAaAaAeEeEiIoOoOoOuUnNcC/' | sed -e 's/\(.*\)/\L\1/') @@ -35,4 +37,4 @@ printf '%s\n%s\n%s\n%s\n%s\n%s\n' "$o_author"\ "$o_date"\ "$o_slug"\ "$o_tag"\ - "$o_title" > "content/$slug.md" + "$o_title" > "content/articles/$slug.md"