- docs_interests=$(grep -e '\- builder:' \
- -e '\- job-group:' \
- -e '\- job-template:' \
- -e '\- parameter:' \
- -e '\- property:' \
- -e '\- publisher:' \
- -e '\- scm:' \
- -e '\- trigger:' \
- -e '\- wrapper:' \
- -A1 "$file" \
- | grep 'name: ' | awk -F': ' '{print $2}' | awk -F"'" '{print $2}' | sort | uniq)
+ mapfile -t docs_interests < <(grep -e '\- builder:' \
+ -e '\- job-template:' \
+ -e '\- parameter:' \
+ -e '\- property:' \
+ -e '\- publisher:' \
+ -e '\- scm:' \
+ -e '\- trigger:' \
+ -e '\- wrapper:' \
+ -A1 "$file" \
+ | grep 'name: ' | awk -F': ' '{print $2}' | sort | uniq \
+ | tr -d "'" | tr -d '"')