#!/bin/sh IFS=$'\n' ROTATE_CONF=$1 if [ -f "${ROTATE_CONF}" ]; then ROTATE="" if [ `cat ${ROTATE_CONF} | grep daily | wc -l` -gt 0 ]; then ROTATE="日毎 " fi if [ `cat ${ROTATE_CONF} | grep weekly | wc -l` -gt 0 ]; then ROTATE="週毎 " fi if [ `cat ${ROTATE_CONF} | grep monthly | wc -l` -gt 0 ]; then ROTATE="月毎 " fi if [ `cat ${ROTATE_CONF} | grep yearly | wc -l` -gt 0 ]; then ROTATE="年毎 " fi ROTATE_GEN=`cat ${ROTATE_CONF} | egrep "^[ \t]*rotate " | sed -e "s/^[ \t]*rotate //g" | sed -e "s/[ \t]*//g"` if [ -n "${ROTATE_GEN}" ]; then ROTATE="${ROTATE}${ROTATE_GEN}世代" fi if [ -n "${ROTATE}" ]; then echo "|ログローテーション|${ROTATE}|" fi fi