diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-08-21 22:12:10 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-08-21 22:12:10 +0000 |
commit | 78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc (patch) | |
tree | 60cc931b6d398b478ac99d6f946e6fbc72d24fb2 /renumptr.sh | |
parent | 539d6bf53bcece62e29d3d7d900b83dc03275b65 (diff) | |
download | libbu++-78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc.tar.gz libbu++-78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc.tar.bz2 libbu++-78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc.tar.xz libbu++-78499c848a9c2bafe1db1ec7ceaf8556e2d7c7cc.zip |
Added loads of debugging to sharedcore, we're sure it's to blame, but not as
much anymore, for the fishtrax issues, maybe.
Diffstat (limited to '')
-rwxr-xr-x | renumptr.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/renumptr.sh b/renumptr.sh new file mode 100755 index 0000000..cceb45a --- /dev/null +++ b/renumptr.sh | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | IN=$1 | ||
4 | OUT=$2 | ||
5 | |||
6 | EXPR="s@00000000@null@g\n" | ||
7 | CNT=1 | ||
8 | for PTR in $(grep -o -E -e '[0-9A-F]{8}' $IN | sort | uniq | grep -v 00000000); do | ||
9 | EXPR="${EXPR}s@${PTR}@$(printf %4d ${CNT})@g\n" | ||
10 | CNT=$(($CNT+1)) | ||
11 | done | ||
12 | |||
13 | temp=$(mktemp) | ||
14 | echo -e "$EXPR" > $temp | ||
15 | sed -f $temp $IN > $OUT | ||
16 | rm $temp | ||
17 | |||