Allow multiple directory command-line arguments

This commit is contained in:
Michael Kerrisk 2006-07-18 16:00:24 +00:00
parent 4291b3e4c4
commit 4fef468eb1
1 changed files with 44 additions and 41 deletions

View File

@ -29,11 +29,13 @@ if test $# -eq 0; then
echo "Usage: $0 [-a] pathname" 1>&2
exit 1;
fi
for page in $(find $1 -type f -name '*.[1-9]' \
for dir in "$@";
do
for page in $(find "$dir" -type f -name '*.[1-9]' \
-exec grep -l FIXME {} \; | sort)
do
cat $page | awk -v SHOW_ALL=$show_all -v PAGE_NAME=$page '
cat "$page" | awk -v SHOW_ALL=$show_all -v PAGE_NAME="$page" \
'
BEGIN {
page_FIXME_cnt = 0;
}
@ -74,3 +76,4 @@ do
}
'
done | sed -e 's/^\.\\"/ /' | sed -e 's/ *$//' | cat -s
done