#!/bin/sh #No parameters means all defined errors are displayed #otherwise the meaning of the specified number is shown. if [ "$#" -ne "1" ]; then re="[^ ]+\$" else re=$1\$ fi echo "#include " | cpp -dD | grep -E "#define E[^ ]+ $re"