newpost (334B) [raw]
1 #!/bin/sh 2 set -e 3 die() { 4 echo "$1" 1>&2 5 exit 1 6 } 7 8 [ -z "$1" ] && die "usage: $(basename "$0") NAME" 9 10 name="$1" 11 TITLE=$(printf "$name" | tr [a-z] [A-Z]) 12 13 cat <<EOM > "$name".7 14 .Dd $(date +"%B %d, %Y") 15 .Dt $TITLE 7 16 .Os 17 .Sh NAME 18 .Nm $name 19 .Nd <desc> 20 .Sh DESCRIPTION 21 entry 22 .Sh SEE ALSO 23 .Bl -bullet -compact 24 .It 25 .Xr blog 7 26 .El 27 EOM