Skip to content

Instantly share code, notes, and snippets.

@larryhynes
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryhynes/9192245 to your computer and use it in GitHub Desktop.
Save larryhynes/9192245 to your computer and use it in GitHub Desktop.
#!/bin/sh
TODOFILE=/Users/larry/todo.taskpaper
TEMPTODO=`basename $0`
LINE=1
TMPFILE=`mktemp /tmp/${TEMPTODO}.XXXXXX` || exit 1
cat | sed 's/^/ -/' | unexpand -t4 > $TMPFILE || exit 1
ed -s $TODOFILE <<SHAZAM
${LINE}r $TMPFILE
w
SHAZAM
rm -f $TMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment