Clean config script...maybe useful

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Clean config script...maybe useful

Postby kmiller » 14. April 2007 23:45

function dostrip() {
grep -v '#' < $1 | sed -e '/./,/^$/!d'
}

#get include directives
grep -i '^include' < httpd.conf | sed -e 's/^.*extra/\.\/extra/g' > includes.out
grep -vi '^include' < httpd.conf > httpd.tmp
echo '#' > httpd.clean
echo '#IMPORTED FROM: httpd.conf' >> httpd.clean
echo '#' >> httpd.clean
echo ' ' >> httpd.clean
dostrip httpd.tmp >> httpd.clean
while read x;do
echo ' ' >> httpd.clean
echo '#' >> httpd.clean
echo '#'IMPORTED FROM: $x >> httpd.clean
echo '#' >> httpd.clean
echo ' ' >> httpd.clean
dostrip $x >> httpd.clean
done < includes.out
rm -f httpd.tmp includes.out
kmiller
 
Posts: 1
Joined: 14. April 2007 23:41

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests