Tweak to 'show macros' command

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4578 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-09-13 17:21:24 +00:00
parent 221ab97220
commit 06ddd1bb02

View File

@ -1039,11 +1039,11 @@ show_command() {
macros)
[ $# -gt 1 ] && usage 1
for macro in ${SHAREDIR}/macro.*; do
foo=`grep 'This macro' $macro | head -n 1`
foo=`grep 'This macro' $macro | sed 's/This macro //'`
if [ -n "$foo" ]; then
macro=${macro#*.}
foo=${foo%.*}
echo " $macro ${foo#\#}" | sed 's/This macro //'
echo " $macro ${foo#\#}"
fi
done
;;