Skip to content

Instantly share code, notes, and snippets.

Avatar
🐈
Focusing

taking taking

🐈
Focusing
View GitHub Profile
View latest-go-lang-ubuntu
#!/bin/bash
# Author by Taking
# (1) go language install + env
DL_PATH_URL="$(wget --no-check-certificate -qO- https://golang.org/dl/ | grep -oP '\/dl\/go([0-9\.]+)\.linux-amd64\.tar\.gz' | head -n 1)"
go_latest_ver="$(echo $DL_PATH_URL | grep -oP 'go[0-9\.]+' | grep -oP '[0-9\.]+' | head -c -2 )"
echo "go ver is $go_latest_ver"
if [ -d /usr/local/go ]; then