1#!/bin/sh - 2# 3# @(#)monthly 5.2 (Berkeley) 04/17/89 4# 5 6host=`hostname -s` 7echo "Subject: $host monthly run output" 8 9# echo "" 10# echo "Doing login accounting:" 11# ac -p | sort -nr +1 12 13echo "" 14echo "Rotating wtmp files:" 15cd /var/account 16if [ -f wtmp.5 ]; then mv -f wtmp.5 wtmp.6; fi 17if [ -f wtmp.4 ]; then mv -f wtmp.4 wtmp.5; fi 18if [ -f wtmp.3 ]; then mv -f wtmp.3 wtmp.4; fi 19if [ -f wtmp.2 ]; then mv -f wtmp.2 wtmp.3; fi 20if [ -f wtmp.1 ]; then mv -f wtmp.1 wtmp.2; fi 21if [ -f wtmp.0 ]; then mv -f wtmp.0 wtmp.1; fi 22mv -f wtmp wtmp.0 23cp /dev/null wtmp 24