#!/bin/sh # check whether there are lines starting with a % containing further # characters grep "^%..*$" `find ../data -type f` if [ -d ../data-more ] ; then MORE=`find ../data-more -type f` if [ _"$MORE" != _"$MORE" ] ; then grep "^%..*$" $MORE fi fi # other usefull checks: # - check empty lines after a %-line (especially for files which are # build from several parts) # - check final files for % in the last line # ---> perl seems to be necessary for data in `find ../data -type f` ; do if ! tail -n1 $data | grep -q '^%$' ; then echo "File $data has no ending '%' line" fi done