1 2 3 4 5 6 7 8 9
#! /bin/sh FILENAME="$1" echo $FILENAME echo "@started:$(date '+%Y-%m-%d')" >> "$FILENAME" if [ $# -eq 3 ] then printf "$3" >> "$FILENAME" fi mv {,qq\ }"$FILENAME"