diff --git a/.github/scripts/readme_file_checker.sh b/.github/scripts/readme_file_checker.sh index 0654089..4ff1695 100755 --- a/.github/scripts/readme_file_checker.sh +++ b/.github/scripts/readme_file_checker.sh @@ -15,8 +15,7 @@ else COUNTER=0 mapfile -t CHALLS_UNDER_DIR < <(echo $(ls "$1" | sort)) - mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | sort )) - + mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | grep -Po "(?<=\[).+(?=\])" | sort )) for dir_chall in "${CHALLS_UNDER_DIR[@]}" do diff --git a/.gitlab/scripts/readme_file_checker.sh b/.gitlab/scripts/readme_file_checker.sh index 0654089..8b309e3 100755 --- a/.gitlab/scripts/readme_file_checker.sh +++ b/.gitlab/scripts/readme_file_checker.sh @@ -15,7 +15,7 @@ else COUNTER=0 mapfile -t CHALLS_UNDER_DIR < <(echo $(ls "$1" | sort)) - mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | sort )) + mapfile -t CHALLS_IN_TABLE < <(echo $(grep -P "^\|" "$2" | tail -n $(($LINES_IN_TABLE - 2)) | cut -d '|' -f 2 | grep -Po "(?<=\[).+(?=\])" | sort )) for dir_chall in "${CHALLS_UNDER_DIR[@]}"