#!/bin/sh cd ~/gtd mkdir -p ~/gtd/done/$(date '+%Y-%m-%d') OIFS="$IFS" IFS=$'\n' for f in $(find . -maxdepth 1 -type f -print0 | xargs -0 grep -li @done) do print $f mv $f ~/gtd/done/$(date '+%Y-%m-%d') done IFS="$OIFS"