Last active
September 17, 2019 08:16
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /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