blog_update (329B)
1 #!/bin/sh 2 cd $(dirname $0)/.. 3 4 grep "\<h1\>" man/blog/posts/*.html | sort -r | sed 's/^.*blog\///;s/:<h1>/ /;s/<\/h1>//' | 5 awk '{print $1,$1,$2}' | sed 's/^[^ 0-9]*\([0-9]*\)[^ ]*/\1/' | awk 'BEGIN{print "<h1>日記</h1><ul>"}END{print "</ul>"}{printf "<li>[%s]<a href=\"%s\">%s</a></li>\n",$1,$2,$3}' > man/blog/blog_index.html