#!/usr/bin/env bash # Сценарий «Открытие страницы»: видимый текст страницы — ровно «Hello». set -euo pipefail f=public/index.html [[ -f $f ]] || { echo "нет $f"; exit 1; } text=$(sed -e '//,/<\/head>/d' -e 's/<[^>]*>//g' "$f" | tr -d '\n' | xargs) [[ $text == "Hello" ]] || { echo "видимый текст: '$text'"; exit 1; } echo ok