Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Apr 04, 2006 11:28 pm 
Offline
Senior Member
User avatar

Joined: Tue Aug 17, 2004 11:37 pm
Posts: 262
Website: http://www.our-lan.com
WLM: nf@our-lan.com
Location: Brisbane, Australia
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
Code:
awstats.example1.com.conf
awstats.example2.com.au.conf
awstats.example3.com.au.conf
awstats.example4.com.au.conf
awstats.conf.local



Basicly
i have to call the program
Code:
/usr/lib/cgi-ban/awstats_buildstaticpages.pl -config=example1.com -dir=/home/hosting/example1.com/www/stats 

a few other paramaters have to be called but nothing important

basicly i want to automate it so i want someway of replacying example1.com 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?

_________________
ServerAdmin - www.our-lan.com
"Diplomacy is the art of saying nice doggy whilst looking for a really big stick"
"In my experiece, any attempt to make any system idiot proof will only challenge God to make a better idiot"


Top
   
 Post subject:
PostPosted: Mon Jul 31, 2006 9:20 am 
Offline
Senior Newbie

Joined: Thu Oct 21, 2004 11:48 am
Posts: 17
for i in $( ls | grep awstats); do
echo item: $i # replace this line with your line
done

_________________
jlin

http://www.jlin.ro
office@jlin.ro


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group