summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxxd-a3
1 files changed, 3 insertions, 0 deletions
diff --git a/xxd-a b/xxd-a
new file mode 100755
index 0000000..c22f1cf
--- /dev/null
+++ b/xxd-a
@@ -0,0 +1,3 @@
+#!/bin/sh
+# `xxd -a`, but besides 00s, it also folds other duplicates
+xxd "$@" | awk -F: '{if(prev==$2){if(p)print "*";p=0}else {print;p=1;}}{prev=$2}'