From b7b48f9be8ab06649eb170f995a175d2bcd23412 Mon Sep 17 00:00:00 2001 From: James Mathews Date: Mon, 25 Sep 2023 16:24:47 -0400 Subject: [PATCH] Update binary expression viewer script to elide first byte ID value newly added. --- test/ondemand/scripts/read-expression-dump-file.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/ondemand/scripts/read-expression-dump-file.sh b/test/ondemand/scripts/read-expression-dump-file.sh index d3006d3af..3ecfb0332 100644 --- a/test/ondemand/scripts/read-expression-dump-file.sh +++ b/test/ondemand/scripts/read-expression-dump-file.sh @@ -4,4 +4,11 @@ if [[ "$1" == "--help" || "$1" == "" ]]; then exit fi -xxd -c 8 -g 0 -b $1 | grep -oE ' [01]+ ' | grep -oE '[01]+' | sed 's/0/ /g' \ No newline at end of file +if ! command -v ggrep &> /dev/null +then + ggrep=grep +else + ggrep=ggrep +fi + +xxd -c 16 -g 0 -b $1 | $ggrep -oP '(?<=[01]{64})[01]+' | grep -oE '[01]+' | sed 's/0/ /g'