I need to find extra line breaks in the code. For example, if after } more than 1 line break, then highlight warning . Here is what I tried:
TAGS="TODO:|FIXME:" echo "searching ${SRCROOT} for ${TAGS}" find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 `egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning:\$1/"` TAGS2="\s+$" echo "searching ${SRCROOT} for ${TAGS2}" find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS2).*\$" | perl -p -e "s/($TAGS2)/ warning\$1/" The first script highlights all the TODO: and FIXME: in the code, but I just can’t understand how to write the second script correctly so that it highlights more than 1 line break after } .
TAGS="TODO:|FIXME:|[\n]{2,}"- Alexander