From 78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 21 Aug 2009 22:12:10 +0000 Subject: Added loads of debugging to sharedcore, we're sure it's to blame, but not as much anymore, for the fishtrax issues, maybe. --- renumptr.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 renumptr.sh (limited to 'renumptr.sh') diff --git a/renumptr.sh b/renumptr.sh new file mode 100755 index 0000000..cceb45a --- /dev/null +++ b/renumptr.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +IN=$1 +OUT=$2 + +EXPR="s@00000000@null@g\n" +CNT=1 +for PTR in $(grep -o -E -e '[0-9A-F]{8}' $IN | sort | uniq | grep -v 00000000); do + EXPR="${EXPR}s@${PTR}@$(printf %4d ${CNT})@g\n" + CNT=$(($CNT+1)) +done + +temp=$(mktemp) +echo -e "$EXPR" > $temp +sed -f $temp $IN > $OUT +rm $temp + -- cgit v1.2.3