#! /bin/sh FILENAME="$HOME/gtd/${2:-WIR} - $1.txt" echo $FILENAME touch "$FILENAME" echo "@recorded:$(date '+%Y-%m-%d')" >> "$FILENAME" if [ $# -eq 3 ] then printf "$3" >> "$FILENAME" fi