commit c5584d28d65b78971210718fc44f0120922d68c4 from: vincent.delft date: Wed May 1 12:23:24 2024 UTC Silently manage comments: line starting by # commit - e29d8d1f99c5f6cf3abde46108df75457916387a commit + c5584d28d65b78971210718fc44f0120922d68c4 blob - 03ccf637bb423bcd48deffe745fbdab374fcec98 blob + 49a4555e2a833925830c42b5539c65e230f6109d --- vdcron +++ vdcron @@ -3,7 +3,7 @@ # Auteur : Vincent # licence : BSD -# Version : 0.6 +# Version : 0.7 # Description : execute schedulled commands without assuming that the machine runs permanently. # This is developped on OpenBSD machine, but since version 0.6 runs on debian jessie too # Dependencies : Since version 0.6, vdcron manage BSD's date and GNU's date. So, we should not have @@ -15,7 +15,7 @@ DEBUG= SLEEP=10 TEMP=$(mktemp) FILE= -VERSION=0.6 +VERSION=0.7 USAGE="$0 options are: -h : this help @@ -133,7 +133,10 @@ while IFS="" read -r line; do line=${line#_} _flag_noexec= fi - if [ "$(expr "$filedate" : '^+[0-9]*')" -gt 0 ]; then + if [ "$(expr "$filedate" : '^#.*$')" -gt 0 ]; then + EXEC="COMMENT" + REMOVE="NO" + elif [ "$(expr "$filedate" : '^+[0-9]*')" -gt 0 ]; then _pastfiledate=${filedate#+} _firstchar="+" if [ "${#_pastfiledate}" -eq 4 -a "$_pastfiledate" -le "$CURRENT_TIME" ]; then