convertcrawl.sh

 

##!/usr/bin
###
### convertcrawl.sh
###
### Recurse through subdirectories and create html files
###
###
 

#date
PATH=/usr/local/bin:$PATH
export PATH


cwd=`pwd`
for i in `find . -type d -print`
do
    cd $i

    for x in `ls -1 | grep -v \.htm | grep -v \.sh | grep -v \.out`
    do
        if ( `file $x | grep text >/dev/null 2>/dev/null` )
        then
             echo "$x"
             convertp.sh $x
             
#        else
#             echo "$x is not a text file"
        fi
    done


#    if [ -f linklist.sh ]
#    then
#        cd $cwd
#        continue
#        #sh ./linklist.sh
#        pwd
#    else
#        xdir=`echo $i | sed "s/\//./g" | sed "s/\.\.//"`
#        echo $xdir
#        mklinklist.sh /usr/tomcat/webapps/ROOT/tech/WAS51 html 
#        #sh ./linklist.sh
#        pwd
#    fi

        cd $cwd

done
   
#date