I\'m trying to write a bash script that increments the version number which is given in
{major}.{minor}.{revision}
For example.
<
Awk makes it quite simple:
echo "1.2.14" | awk -F \. {'print $1,$2, $3'} will print out 1 2 14.
echo "1.2.14" | awk -F \. {'print $1,$2, $3'}
flag -F specifies separator.
If you wish to save one of the values:
firstVariable=$(echo "1.2.14" | awk -F \. {'print $1'})