Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2005 13:14:57 -0600
From:      "antenneX" <antennex@swbell.net>
To:        <freebsd-questions@freebsd.org>
Subject:   An AWK question
Message-ID:  <005c01c50aed$d105c3b0$0200000a@SAGEAME>

next in thread | raw e-mail | index | archive | help
---> FBSD-4.10p2

I have a script that tells me when a mailbox exceeds 2MB. Using it for
another purpose. how can I modify this script to tell me when a file is
LESS than a certain size?

---------------------------------------------
#!/bin/sh

#AWK=/usr/bin/awk
#FILE=/file/size/to/check
#LS=/bin/ls
#SIZE=2048     # (2048 = 2MB)

#if [ `${LS} -s ${FILE} | ${AWK} '{ print $1 }'` -gt ${SIZE} ]; then
#    echo File ${FILE} is ABOVE normal | mail -s "Alert: Check the file"
#fi
---------------------------------------------

Thanks, and....

Best regards,

Jack L. Stone



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005c01c50aed$d105c3b0$0200000a>