compress.sh revision 7c478bd95313f5f23a4c958a745db2134aa03244
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#!/sbin/sh
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# CDDL HEADER START
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# The contents of this file are subject to the terms of the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# Common Development and Distribution License, Version 1.0 only
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# (the "License"). You may not use this file except in compliance
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# with the License.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# or http://www.opensolaris.org/os/licensing.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# See the License for the specific language governing permissions
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# and limitations under the License.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# If applicable, add the following below this CDDL HEADER, with the
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews#
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews# CDDL HEADER END
#
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
# compress - compress the spell program log
trap 'rm -f /usr/tmp/spellhist;exit' 1 2 3 15
echo "COMPRESSED `date`" > /usr/tmp/spellhist
grep -v ' ' /var/adm/spellhist | sort -fud >> /usr/tmp/spellhist
cp /usr/tmp/spellhist /var/adm
rm -f /usr/tmp/spellhist