Mercurial > hg > freeDiameter
changeset 1445:519c1a85dcd1
grep_fd_dict_dump: add tool
Add tool grep_fd_dict_dump:
Grep stdin for the output of fd_dict_dump() and reformat to remove
pointer addresses. Use to post-process the output of dict_dump.fdx
into a format that's diff-able between freeDiameter invocations.
author | Luke Mewburn <luke@mewburn.net> |
---|---|
date | Thu, 27 Feb 2020 17:17:27 +1100 |
parents | ab7cb954f17e |
children | 48438d36e435 32f158d0d859 |
files | contrib/tools/grep_fd_dict_dump |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/tools/grep_fd_dict_dump Thu Feb 27 17:17:27 2020 +1100 @@ -0,0 +1,10 @@ +#!/bin/sh + +# Grep stdin for the output of fd_dict_dump() and reformat to remove +# pointer addresses. Use to post-process the output of dict_dump.fdx +# into a format that's diff-able between freeDiameter invocations. + +egrep '^ *{dict|VENDOR|APPLICATION|TYPE|ENUMVAL|AVP|COMMAND|RULE' \ + | sed \ + -e 's/{dict.*}(@0x[^ ]*): //' \ + -e 's/p:[^ ]* //'