#!/usr/bin/env bash found_stable=0 curl -s -L "https://webkitgtk.org/" | \ while read -r line; do [ "$found_stable" -eq 1 ] && { wkver=${line%.tar.xz*}; wkver=${wkver#*webkitgtk-}; \ echo "$wkver"; break; } [[ "$line" =~ "Stable tarball" ]] && found_stable=1 done