Que Length Check
Patterson, S R
S.R.Patterson at soton.ac.uk
Wed Jan 30 10:02:53 GMT 2002
Take out the "LSLEN" line now and put a \ in front of the * in the
find line. What's happening is the * in the find line is being
expanded out to every file in the directory, overrunning your command
line. That's why the find was there instead of the ls to start with.
--
Steven Patterson, MSci ----------------------------------------------+
| Electronic Information Systems Support and Development |
| Computing Services, University of Southampton, UK. |
+-------------------------------------------- Tel: +44 (0) 2380 595810
...... ......
.. Conviction is a bigger enemy of the truth than lies. ..
...... ......
> -----Original Message-----
> From: Steve Evans [mailto:sevans at FOUNDATION.SDSU.EDU]
> Sent: 29 January 2002 22:35
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Que Length Check
>
>
> I wrote a script that looks like the following according to
> Julian's instructions. When I run it tells me there are to
> many arguments. Any ideas?
>
> Steve
>
>
>
>
> #!/bin/sh
>
> #Define this to be your maximum allowed mail queue length
> MAXLEN=20
>
> LSLEN='cd /var/spool/mqueue.in && ls | wc -l'
> QUEUELEN='find /var/spool/mqueue.in -name q* | wc -l'
>
> if [ $QUEUELEN -gt $MAXLEN ]; then
> touch /var/spool/mqueue.in-file
> fi
>
More information about the MailScanner
mailing list