#!/sbin/sh
#	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
#	  All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

# Copyright (c) 1988, 2015, Oracle and/or its affiliates. All rights reserved.

#ident	"@(#)compress.sh	1.6	15/01/20 SMI"	/* SVr4.0 1.3	*/
#	compress - compress the spell program log

H_SPELL=${H_SPELL:-$HOME/.spellhist}
trap 'rm -f /usr/tmp/spellhist;exit' 1 2 3 15
echo "COMPRESSED `date`" > /usr/tmp/spellhist
grep -v ' ' $H_SPELL | sort -fud >> /usr/tmp/spellhist
cp /usr/tmp/spellhist $H_SPELL
rm -f /usr/tmp/spellhist
