#!/bin/sh -e
: ${todo:=~/.todo}
: ${blog:=~/.blog}
<"$todo" awk -F'\t' "BEGIN{f=1; OFS="\t"} /$*/&&f {f--;print}" |
kutout 1 |
prepend "`dt`	" | tee -a "$blog"
<"$todo" awk -F'\t' "BEGIN{f=1; OFS="\t"} !(/$*/&&f) {print} /$*/&&f {--f}" >"$todo.1"
mv "$todo.1" "$todo"
