Hi friends,
I am getting some trubles in folder reading. I am having 10 subfolders inside server7 folder. i wanna to read a subfolder name first and check if the foldername gets started with "http". if so , i need to read a file inside that folder. This willl continue for that 10 folders and quit after read the all subfolders. for the abov e requirement i wrote code like this
for file in /x/y/server/* ;
do
start=`echo $file | cut -d "-" -f 1`
if [ $start == "http" ]
then
cd /x/y/server/$file/config
if [ -f filename ]
then
size=`ls -ltr filename awk '{print $5}' `
if [ $size == 0]
then
echo " The size of $filename is $size . "
here i gave only the fubctionality.
But i am to read very first folder only. I am not able to read rest of the folder.
can anyone help me for this...
Thanks in advance..