Skip to content

Instantly share code, notes, and snippets.

@cybertramp
Last active September 17, 2019 08:16
Show Gist options
  • Select an option

  • Save cybertramp/ac2fc2dd02af4a4dc720482f8045440f to your computer and use it in GitHub Desktop.

Select an option

Save cybertramp/ac2fc2dd02af4a4dc720482f8045440f to your computer and use it in GitHub Desktop.
This script append the date in file name. The date is automatically added to the file name of the created post file.
#! /bin/bash
# =============================
#
# Hugo fast write script
#
# Created 19.09.17(paran_son@outlook.com)
#
# =============================
#
# The date is automatically added to the
# file name of the created post file.
#
# =============================
hugo_path=`dirname $PWD`/hugo
now_date=`date +%F`
echo "Please input filename"
read input
${hugo_path} new post/${now_date}-${input}.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment