+ echo -n -e " lines processed: $counter\r";
+
+ #
+ # extract path to local rst file
+ #
+ path_rst=$line;
+ #echo "DBUG line: $line"
+ # remove problematic text in line that causes regex to fail
+ path_rst=$(echo "$path_rst" | sed -r 's:, other instance in.*::');
+ #echo "DBUG path_rst: $path_rst"
+ # grep the rst file path
+ path_rst=$(echo "$path_rst" | grep -oP "^/.*\.rst");
+ #echo "DBUG path_rst: $path_rst"
+ if [[ "$path_rst" == "" ]] ; then
+ path_rst="path_to_rst_missing"
+ #echo "DBUG path_rst: $path_rst"
+ fi
+ path_rst="file:$path_rst";
+ #echo "DBUG path_rst: $path_rst"
+ # finally embed the full rst path in a message to use mouse-over/context menu of bash to open file
+ #echo -e '\e]8;;'$path_rst'\a(rst)\e]8;;\a'
+ path_rst='\e]8;;'$path_rst'\arst\e]8;;\a';
+ #echo -e "DBUG path_rst: "$path_rst;
+
+ #
+ # extract path to the html version of the local rst file
+ #
+ path_html=$line;
+ #echo "DBUG line: $line"
+ # remove problematic text in line that causes regex to fail
+ path_html=$(echo "$path_html" | sed -r 's:, other instance in.*::');
+ #echo "DBUG path_html: $path_html"
+ # grep the rst file path and modify it so we get the local html build path; grep a little bit more to be save
+ path_html=$(echo "$path_html" | grep -oP "(^|/)docs(/.*|)/[\w -]*\.rst");
+ #echo "DBUG path_html: $path_html"
+ path_html=$(echo "$path_html" | sed -r 's:^/docs::');
+ #echo "DBUG path_html: $path_html"
+ path_html=$(echo "$path_html" | sed -r 's:.rst:.html:');
+ #echo "DBUG path_html: $path_html"
+ # create also the path to the web version
+ path_web="https://docs.onap.org/en/latest$path_html"
+ path_web='\e]8;;'$path_web'\aweb\e]8;;\a';
+ #echo "DBUG path_web: $path_web"
+ path_html="file:$html_build_dir$path_html";
+ #echo "DBUG path_html: $path_html"
+ # finally embed the full html path in a message to use mouse-over/context menu of bash to open file
+ #echo -e '\e]8;;'$path_html'\a(html)\e]8;;\a'
+ path_html='\e]8;;'$path_html'\ahtml\e]8;;\a';
+ #echo -e "DBUG path_html: "$path_html;
+
+
+ # extract module name from line (remove all text before module name; then cut out module name)
+ module=$(echo "$line" | sed -r 's:(^.*/doc/docs/submodules/|^docs/submodules/|checking consistency... )::' | cut -f1 -d\/);
+ #echo "DBUG line: $line"
+ #echo "DBUG module: $module"
+
+ # in case the extraction has not lead to a valid module name do some additional investigation
+ if [[ "$module" == "" ]] ; then