CATFIN="$(echo$CATSTR| cut --complement -d' ' -f1 | sed 's/\(Linux\|Software\|Technology\|Design\|Guides\|Literary\|Other\)/<a style="color:#ff79c6" href="..\/blog\/&\/"><strong>&<\/strong><\/a>/g'| sed 's/\/blog\/\(Linux\|Software\|Technology\|Design\|Guides\|Literary\|Other\)/\L&/g'| sed 's/\//\\\//g'| sed 's/\&\&/\\\&\\\&/g')"
POSTED=$(date +'%d %B %Y')
read -p "Enter post title: " TITLE
read -p "Enter post relative URL: " URL
read -p "Enter reading time: " READ
read -p "Enter previous post: " PREVPOST
EMAIL=$(echo$TITLE| sed 's/ /%20/g')
cd ~/docs/sys/gits/sufyaan-website
mkdir -p $URL
cp template.html $URL/index.html
# Replacing placeholders with values in new post
sed -i "s/POST TITLE/$TITLE/g"$URL/index.html
sed -i "s/POST DATE/$POSTED/g"$URL/index.html
sed -i "s/READING/$READ/g"$URL/index.html
sed -i "s/MAILSUBJECT/$EMAIL/g"$URL/index.html
sed -i "s/URL/$URL/g"$URL/index.html
sed -i "s/PREVIOUSPOST/$PREVPOST/g"$URL/index.html
sed -i "s/POSTCATEGORIES/$CATFIN/g"$URL/index.html