Skip to content

Commit

Permalink
Escaping % is done with %%
Browse files Browse the repository at this point in the history
  • Loading branch information
Caspar van Leeuwen committed Oct 7, 2024
1 parent ebb8dac commit e669768
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bot/check-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ else
GP_success_full='(?s)\[----------\] start processing checks.*?\[==========\] Finished on [a-zA-Z0-9 ]*'
# Replace null character with <br/>
# Replace new line characters with <br/>
# Replace % with \%. Use \\% to interpret \ as character, instead of escape character
# Replace % with %%. Use \%\% to interpret both %% as (non-special) characters
grep_reframe_success_full=$( \
grep -v "^>> searching for " ${job_dir}/${job_out} | \
grep -Pzo "${GP_success_full}" | \
sed 's/\x00/<br\/>/g' |
sed ':a;N;$!ba;s/\n/<br\/>/g' |
sed 's/\%/\\%/g' \
sed 's/\%/\%\%/g' \
)
grep_reframe_result=${grep_reframe_success_full}
echo "grep_reframe_success_full: ${grep_reframe_success_full}"
Expand Down

0 comments on commit e669768

Please sign in to comment.