From c242cf8455280b8118cb47c2d801fc11c8c72cce Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 8 Aug 2020 01:30:46 +0800 Subject: [PATCH] Standardize posts' file name in tool scripts. --- _scripts/sh/dump_lastmod.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_scripts/sh/dump_lastmod.sh b/_scripts/sh/dump_lastmod.sh index eeed57e..ceb8ba5 100755 --- a/_scripts/sh/dump_lastmod.sh +++ b/_scripts/sh/dump_lastmod.sh @@ -76,7 +76,7 @@ main() { for _file in $(find ${POST_DIR} -type f \( -iname \*.md -o -iname \*.markdown \)) do - _filename=$(basename $_file | sed 's/[0-9]\([0-9]*-\)//g;s/\..*//' ) # remove date and extension + _filename=$(basename $_file | sed 's/-\-\+/-/;s/[[:digit:]]\([[:digit:]]*-\)//g;s/\..*//' ) # remove date and extension if _has_changed "$_file"; then _dump "$_filename" "$_file"