Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site oddjob.UChicago.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!gargoyle!oddjob!matt From: matt@oddjob.UChicago.UUCP (Matt Crawford) Newsgroups: net.sources Subject: Re: Mods to tee...Uses for awk Message-ID: <574@oddjob.UChicago.UUCP> Date: Tue, 22-Jan-85 14:29:11 EST Article-I.D.: oddjob.574 Posted: Tue Jan 22 14:29:11 1985 Date-Received: Wed, 23-Jan-85 07:24:20 EST References: <350@rna.UUCP> Reply-To: matt@oddjob.UUCP (Matt Crawford) Organization: U. Chicago: Astronomy & Astrophysics Lines: 15 Here's a script which we run twice a week from crontab. It used to use du(1) instead of the 4.2 quot(8). No flames about not having used sh, please -- I wrote this before I knew any better. #! /bin/csh -f # Script to notify heavy disk users of their sins # Change the constant at the beginning of the awk command as needed. # /etc/quot -f /dev/rra0f | \ grep -v 'root' | \ awk '$1 > 10000 { printf "mail %s << EOM\n", $3 ;\ printf "Your %d files on /oa are using %d KB.\n",$2,$1;\ printf "This makes you the number %d disk-hog.\n",NR;\ printf "EOM\n" ; }' | \ csh -sf