Maybe something like this may help you

#!/bin/bash## requirements: bc, awk, tr, cut##_gocurrel="$(go
version|awk '{print $3}'|tr -d "go"|cut -d"."
-f1-2)"_gominrel="1.5"###_key=$(echo "$_gominrel > $_gocurrel" | bc
-l)###if [ "$_key" != "0" ]then
        echo "Ops! Current go release is $_gocurrel and you need $_gominrel"
        exit 1fi###



On Wed, Aug 9, 2017 at 10:15 AM, Shawn Milochik <shawn.m...@gmail.com>
wrote:

> Running "go version" at the command line returns a version number. You can
> parse that.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Noilson Caio Teixeira de Araújo
https://ncaio.wordpress.com
https://br.linkedin.com/in/ncaio
https://twitter.com/noilsoncaio
https://jammer4.wordpress.com/
http://8bit.academy

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to