alpineversion=`cat /etc/alpine-release | cut -d "." -f 1-2 | awk '{print "v"$1}'`
In case you care about it, the AWK command can read a file by itself and also extract the fields that you tell it, eliminating the need for the commands cat and cut from the pipe.
e.i.
alpineversion=$(awk -F\. '{printf"v%s.%s", $1, $2}' /etc/alpine-release)
https://github.com/ibuetler/alpine-linux-setup/blob/d91492cc15ad9e83f70302e7b5237c8bc2890b5f/step1.sh#L3C1-L3C82
In case you care about it, the AWK command can read a file by itself and also extract the fields that you tell it, eliminating the need for the commands cat and cut from the pipe.
e.i.