INNER CODE UNIT · Shell
LASTDATA
todotxt/todo.txt-cli · todo.sh:1485
LASTDATA=${LASTREPORT#* } # Strip timestamp.
if [ "$LASTDATA" = "$NEWDATA" ]; then
echo "$LASTREPORT"
[ "$TODOTXT_VERBOSE" -gt 0 ] && echo "TODO: Report file is up-to-date."
else
NEWREPORT="$(date +%Y-%m-%dT%T) ${NEWDATA}"
echo "${NEWREPORT}" >> "$REPORT_FILE"
echo "${NEWREPORT}"
[ "$TODOTXT_VERBOSE" -gt 0 ] && echo "TODO: Report file updated."
fi
;;
"deduplicate")
if [ "$TODOTXT_PRESERVE_LINE_NUMBERS" = 0 ]; then
deduplicateSedCommand='d'
else
deduplicateSedCommand='s/^.*//; p'
fi