#!/bin/bash URL="https://launchpad.net/python-distutils-extra" # Get version number from tag name VERSION=$(curl -s -L "$URL" | grep 'Latest version is ' | grep -o -P '\d+\.\d+(\.\d+)?') echo "$VERSION"