The Open Source Swiss Army Knife

/unix/unix_editors/sed/
/unix/unix_editors/sed/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /unix   /unix_editors   /sed 
Permalink: webalizer.sed
Title: add
article options : please login

#!/bin/sh
# httpd.conf: <virtual host>... CustomLog /var/log/httpd/`virtual-host-name`-al
# </virtual host>
# cd /etc/webalizer; ls ====>>>> `virtual-host-name1.conf virtual-host-name2.conf .......
# this script invokes `webalizer` passing it each log file name which
# is turned into the conf file
# minus the -al on the end
# name for properties to be read from
cd /var/log/httpd; ls -al | sed -n 's/\(.\)-al/\1/p' | awk '

        BEGIN { i = 0 }
        { cmd="/usr/bin/webalizer -c /etc/webalizer/"$0".conf";
                        system(cmd);
                        i++; }
        END { print i }'

exit 0


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top