[Snort-users] Snortdb against MySQL

Gregor Binder gbinder at ...462...
Thu Mar 22 10:47:32 EST 2001

Neil Dickey on Thu, Mar 22, 2001 at 09:11:01AM -0600:


>   test -f $1.4.gz && mv $1.4.gz  $1.5.gz
>   test -f $1.0.gz && mv $1.0.gz  $1.1.gz

you could write this more flexible using a loop like this:

while [ "$BKPLIMIT" -gt 0 ]; do
  [ -f "$1.${BKPLIMIT}.gz" ] && \
    mv "${1}.${BKPLIMIT}.gz" "${1}.${BKPSFX}.gz"

mv "$1.gz" "${1}.0.gz"

and have people define the number of compressed files they want to keep
(BKPLIMIT) somewhere towards the top of the script.

just an idea,

Gregor Binder       <gregor.binder at ...462...>      http://sysfive.com/
sysfive.com GmbH               UNIX. Networking. Security. Applications.
PGP id: 0x20C6DA55 fp: 18AB 2DD0 F8FA D710 1EDC A97A B128 01C0 20C6 DA55

More information about the Snort-users mailing list