25 lines · 531 B · Text
RawDownload
#!/bin/rc # You'll want to change this variableblogdir=$home/www/b months=(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) wordmonth=`{date | awk '{print $2}'}day=`{date | awk '{print $3}'}year=`{date | awk '{print $6}'} for (i in `{seq 1 12}) {	if (~ $months($i) $wordmonth) {		month=$i	}} directory=$blogdir/$year/$month/$dayecho Creating $directorymkdir -p $directory posts=`{ls $directory}echo There are already $#posts posts for this day, creating a new one now.touch $directory/$#postsB $directory/$#posts