#!/bin/bash
# /usr/local/bin/chrontouch
# http://crystalfaeries.net/posix/bin/chrontouch
# celeste:crystalfaery CHRONTOUCH 2017-04-17 04:26:09+00:00
# This is our todo touch script in support of blog edit script
# go to the blog source directory where we edit
cd /home/crystalfaeries.net/src || exit -1 >> /var/log/chronicle.log 2>&1
chmod o-rwx . # while we are here, make sure permissions are correct
# touch to-do files (hidden .??* files) in size order
for f in $(du -s .??* | sort -n | cut -f2- | grep -v '^201[0-9]-')
do
touch $f
sleep 61 # in case user standard ls display does not include seconds of time
done >> /var/log/chronicle.log 2>&1
# now user will find largest todo file as most recent todo file
touch /usr/local/bin/.??* # and finally, prioritize scripting TODOs
syntax highlighted by Code2HTML, v. 0.9.1