#!/bin/bash URL="https://bitmath.org/code/mtdev/" # Get version number from FTP server VERSION=$(curl -L "$URL" | grep -oP "mtdev v(\d+.\d+.\d+)" | head -n1) # Remove prefix VERSION=${VERSION//mtdev v/} echo "$VERSION"