### link_dev.sh ### ### Create hyperlinks within Notiva's dev code ### ### cd /usr/tomcat/webapps/ROOT/depot/dev/cbo-abalone/primary echo " " echo "Finding html files " echo " " find . -name \*.java.html -print | grep -v index.html | sed "s/\//\\\\\\//g" > /tmp/tmp.$$ echo " " echo "Looping..." echo " " for z in `sort -r /tmp/tmp.$$` do x=`basename $z .java.html` echo " " echo "Searching for $x" echo " " for i in `find . -name \*.html -print` do if `grep "$x" $i >/dev/null 2>/dev/null` then if `grep "$x" $i | grep -i "<h" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep -i "<title" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "$x<\/a>" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "$x <\/a>" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "$x[a-z]" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "_${x}" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "${x}_" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "$x[A-Z]" >/dev/null 2>/dev/null` then continue fi if `grep "$x" $i | grep "$x[0-9]" >/dev/null 2>/dev/null` then continue fi echo "Found $x in $i" echo "Replacing with $z" fi done done