#!/bin/bash # this finds any one-word commented items, which are often a sign of a formal # parameter that was commented out because it's unused. that's a suboptimal # way to fix the compiler warning for some people, and so this will find any # occurrences of the "wrong"ish way. # (one different way that some think is more optimal is to use the formal() # macro to hide the function definition.) source $SHELLDIR/find_all_sources.sh # got a list of source files now. function examine_file { file=$1 if [ ! -z "`sed -n -e 's/\/\*[a-z_A-Z][a-z_A-Z0-9]*\*\//yo/p' <\"$file\"`" ]; then echo "$file" fi } while true; do read line_found if [ $? != 0 ]; then break; fi examine_file "$line_found" done <$SOURCES_FOUND_LIST rm $SOURCES_FOUND_LIST