#!/bin/bash URL="https://go.dev/VERSION?m=text" VERSION=$(curl -s -L "$URL" | head -n1) # Trim prefix VERSION=${VERSION//go/} echo "$VERSION"