aboutsummaryrefslogtreecommitdiff
path: root/blogarticledate
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-05-07 21:34:07 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-05-07 21:34:07 +0200
commit66d9ecaa26925ffcc0947e887cc7a94f79268644 (patch)
treecde639475dfa226ad8d5353a7a5142fa23f0649b /blogarticledate
downloadblog-66d9ecaa26925ffcc0947e887cc7a94f79268644.tar.gz
blog-66d9ecaa26925ffcc0947e887cc7a94f79268644.tar.bz2
blog-66d9ecaa26925ffcc0947e887cc7a94f79268644.zip
blog scripts
Diffstat (limited to 'blogarticledate')
-rwxr-xr-xblogarticledate13
1 files changed, 13 insertions, 0 deletions
diff --git a/blogarticledate b/blogarticledate
new file mode 100755
index 0000000..845ddcf
--- /dev/null
+++ b/blogarticledate
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+postArray=( $(ls *.html) )
+for posts in "${postArray[@]}"; do
+ post=$posts
+ postdate=$(grep -o '>.*</h5>' $post | sed 's/\(>\|<\/h5>\)//g')
+ echo $postdate
+ #[[CC]YY]MMDDhhmm[.ss]
+ postdate="${postdate//-}0000"
+ echo Date=$postdate
+ echo Item=$post
+ touch -a -m -t $postdate $post
+done