Thanks for reply,Not working means when i pass one value in loop to Variable $confd,I don't process it instead it consider online with all the document root.I show you my code,and if i run staticelly using /var/www/html output is fine but when i put
in loop problem occourced.I show you output for both.
Code:
#!/bin/bash
let test=0
abc="/var/www/html"
docroot=$(grep -H DocumentRoot /etc/httpd/conf.d/*.conf | awk -F' ' '{ print $3 }'| sort -u | uniq)
doccount=$(grep -H DocumentRoot /etc/httpd/conf.d/*.conf | awk -F' ' '{ print $3 }'| sort -u | uniq | wc -l)
#i=0
#while [ $i -le $doccount ]
# do
# confd="$docroot\n"
#echo $confd
find $abc -type d -perm /o=w | while read DIR
do
test=$(cd "$DIR"; ls -A *.html *.php 2>/dev/null | wc -l)
if [ "$test" != "0" ]
then
echo "DIR Found WITH FILES"$DIR $test
fi
if [ `ls -a "$DIR" | wc -l` -le 2 ]
then
echo "Writable_dir Empty"$DIR
fi
done
#i=$(( $i + 1 ))
#done
count=$(find /var/www/html/ -type f -perm /o=w | grep -i ".htaccess"| wc -l )
find "$abc" -type f -perm /o=w | grep -i ".htaccess" | awk -F. '{ print $1 }' | while read this
do
echo "_htaccess_is_Writable"$this
done
Output with static docroot
DIR Found WITH FILES/var/www/html/test3 4
DIR Found WITH FILES/var/www/html/test3/abc 2
Writable_dir Empty/var/www/html/abc
DIR Found WITH FILES/var/www/html/test/abc 1
DIR Found WITH FILES/var/www/html/test2 1
Output with duynamic Docroot
"/var/www/html" "/var/www/test/www.example.com" "/var/www/www.example.com"\n
find: "/var/www: No such file or directory
find: "/var/www/test: No such file or directory
find: "/var/www: No such file or directory
"/var/www/html" "/var/www/test/www.example.com" "/var/www/www.example.com"\n
find: "/var/www: No such file or directory
find: "/var/www/test: No such file or directory
hi all,
i have written the following code:
while(proceed !='Y' && proceed!='N' && proceed!='y' && proceed!='n')
{
printf("\nPress \n\t 'Y' or 'y' to continue \n\t 'N' or 'n' to cancel:");
scanf("%c",&proceed);
}
the output i am gettin is:
Press
'Y' to continue
... (1 Reply)
Got a problem with a loop that do this for each line:
a=$(( cost + $( awk ' { print $2 } ' file) ))
awk ' $2 ~ "^" && $2 > 0 {$2='$a';print} ' file
#!/bin/sh
cost=30
for, until, while?
do
"db update OD_LINK_COST something"
done
For troubleshoot the file looks like this
55 10
56 ... (1 Reply)
Hi,
I faced a problem when I try to populate a database using the following script
DECLARE
a NUMBER := 1;
b NUMBER := 91317010001;
c NUMBER := 1;
BEGIN
WHILE a < 5001 LOOP
insert into RGC_IMS_REGISTRATION (IMSRegId, Type, IMPI, IMPU, CP_ID, Location_For_Registration,... (1 Reply)
hi guys,
i have a simple if loop as follows:
if } -lt ${ARRAY}]; then
echo "alert!!"
fi
when i run it, i get command not found error..i sat and stared at it for hours.. what is wrong with it? (3 Replies)
Hi guys my while do loop is not working properly;
As soon as the load_date and run_date is same it should stop can somebody tell me where I am having the problem?
In an oracle table I have
LOAD_DT=5/1/2009 DATE datatype
RUN_DT=5/5/2009 DATE datatype
Now in a script with a spool file I get the... (15 Replies)
Hi
What is wrong with this loop
it was taken has a example in book!!!
it returns
then
/usr/sbin/svcadm disable ppserv
else /usr/sbin/ppadmin stop
fi
} (3 Replies)
Hello friends,
Please have a look at this code, and then i will tell you the problem.
int main()
{
int i = 0;
int cont = 1;
while( cont == 1 )
{
printf( "Enter i\n" );
scanf( "%d", &i );
switch( i )
{
... (5 Replies)
I am trying to do a while do loop that asks for a password and returns if the password entered is incorrect. I have that part working however i want to modify it so that if a similar word is entered it will read "that is close but incorrect" and i cannot seem to get it working, being new in the... (6 Replies)
Hi all,
a problem with a loop. Imagine it starts with
var1="$(cat txtif.out )"while
do
echo file1
echo file2
echo y > txtif.out
if
then
break
fi
done
exit 0
the problem is that if the file is changing during the loop seems to continue as it reads "x" state,... (5 Replies)
Discussion started by: Board27
5 Replies
LEARN ABOUT DEBIAN
munin-html
MUNIN-HTML(8) Munin Documentation MUNIN-HTML(8)NAME
munin-html - A program to generate html-pages in an Munin installation
SYNOPSIS
munin-html [options]
OPTIONS --service <service>
Limit services to those of <service>. Multiple --service options may be supplied. [unset]
--host <host>
Limit hosts to those of <host<gt>. Multiple --host options may be supplied. [unset]
--config <file>
Use <file> as configuration file. [/etc/munin/munin.conf]
--help
View help message.
--[no]debug
If set, view debug messages. [--nodebug]
DESCRIPTION
Munin-html is a part of the package Munin, which is used in combination with Munin's node. Munin is a group of programs to gather data
from Munin's nodes, graph them, create html-pages, and optionally warn Nagios about any off-limit values.
Munin-html creates the html pages.
FILES
/etc/munin/munin.conf
/var/lib/munin/datafile
/var/log/munin/munin-html
/var/cache/munin/www/*
/var/run/munin/*
VERSION
This is munin-html version svn-trunk-r4007
AUTHORS
Knut Haugen, Audun Ytterdal and Jimmy Olsen.
BUGS
munin-html does, as of now, not check the syntax of the configuration file.
Please report other bugs in the bug tracker at http://munin-monitoring.org/ <http://munin-monitoring.org/>.
COPYRIGHT
Copyright (C) 2002-2009 Knut Haugen, Audun Ytterdal, and Jimmy Olsen / Linpro AS.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program is released under the GNU General Public License
SEE ALSO
For information on configuration options, please refer to the man page for munin.conf.
2.0.6-4+deb7u2 2013-11-12 MUNIN-HTML(8)