Browse Source

a script to extract preproc string

avadapal 1 year ago
parent
commit
b0a90a2e1e
1 changed files with 19 additions and 0 deletions
  1. 19 0
      repro/extract_preproc_string.sh

+ 19 - 0
repro/extract_preproc_string.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+file_path="$1"
+
+extract_values() {
+    while IFS= read -r line; do
+        if [[ $line == "Precomputed values used:"* ]]; then
+            echo "${line#Precomputed values used: }"
+            break
+        fi
+    done < "$file_path"
+}
+
+if [ -z "$file_path" ]; then
+    echo "Usage: ./extract_values.sh <file_path>"
+else
+    extract_values
+fi
+