#!/bin/sh # # Purpose: Used to check if the html files contain any backslashes, which # often indicates a raw formatting command that didn't get # translated by the cc_manual_to_html program. # # Usage: backslash_grep [d1 d2 ...] # # If no argument is given, the default is to grep all html files # in the current directory and all subdirectories. Otherwise, # only the html files in subdirectories given as arguments are # searched. if [ $# -ne 0 ] ; then CONTENTS="$*" HTML_FILES="" else CONTENTS=`ls` HTML_FILES=`ls *.html` fi if [ "$HTML_FILES" != "" ]; then grep -n '\\[^n]' $HTML_FILES fi for DIR in $CONTENTS; do if [ -d $DIR ]; then cd $DIR echo "in directory $DIR" HTML_FILES=`ls *.html` if [ "$HTML_FILES" != "" ]; then grep -n '\\[^n]' $HTML_FILES fi echo "leaving directory $DIR" cd .. fi done