diff options
author | Adam M. Stück <adam@adast.xyz> | 2022-12-16 21:35:38 +0100 |
---|---|---|
committer | Adam M. Stück <adam@adast.xyz> | 2022-12-17 17:03:19 +0100 |
commit | 490431782825d9d032d301fa2ea9665fa2f87b7e (patch) | |
tree | 9212eaf223e1d943c3332bf76412da939b15bc31 | |
parent | ae08f6fe70a1a525662905a6ded935c05bb053f1 (diff) |
Simplified some data parsing in 'run_model'
-rwxr-xr-x | run-model | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -62,11 +62,11 @@ main () { RESULT="FALSE" fi - DISCOVERED_STATES=$(echo "$TMP" | grep -m 1 'discovered states:' | grep -Eo '[0-9]+$') - EXPLORED_STATES=$(echo "$TMP" | grep -m 1 'explored states:' | grep -Eo '[0-9]+$') - EXPANDED_STATES=$(echo "$TMP" | grep -m 1 'expanded states:' | grep -Eo '[0-9]+$') - MAX_TOKENS=$(echo "$TMP" | grep -m 1 'max tokens:' | grep -Eo '[0-9]+$') - SEARCH_TIME=$(echo "$TMP" | grep -m 1 'search time taken:' | grep -Eo "[0-9]+\.[0-9]+") + DISCOVERED_STATES=$(echo "$TMP" | grep -m 1 'discovered states:' | awk '{print $3}') + EXPLORED_STATES=$(echo "$TMP" | grep -m 1 'explored states:' | awk '{print $3}') + EXPANDED_STATES=$(echo "$TMP" | grep -m 1 'expanded states:' | awk '{print $3}') + MAX_TOKENS=$(echo "$TMP" | grep -m 1 'max tokens:' | awk '{print $3}') + SEARCH_TIME=$(echo "$TMP" | grep -m 1 'search time taken:' | awk '{print $4}') OUTPUT+="\n$MODEL\t$QUERY\t$SOLVED\t$RESULT\t$STRAT\t$TIME\t$DATE\t$TIME_LIMIT\t$MEM_USED\t$RETVAL\t$FORMULA\t$TIMED_OUT\t$ERROR_MSG\t$DISCOVERED_STATES\t$EXPLORED_STATES\t$EXPANDED_STATES\t$MAX_TOKENS\t$SEARCH_TIME" done done |