custom awstats scripty type thing

Ok.. so im after ideas.. my bash coding isnt to crash hot so an alternative would be great.. but heres what i want

i use static awstats pages to show my stats for my site and others that i host, i have config files that look like this


i have to call the program

/usr/lib/cgi-ban/ -dir=/home/hosting/ 

a few other paramaters have to be called but nothing important

basicly i want to automate it so i want someway of replacying with one of other sites as listed in the directory.

Im thinking like looping through the directory passing for files that have awstats* and *.conf and using the middle bit as the identifier for everything, but im not sure how to do that..

any suggestions?

1 Reply

for i in $( ls | grep awstats); do

echo item: $i # replace this line with your line



Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct