I have following file, where i want to increment the versioncode:
version=$(<versioncode.txt)
echo "$version"
version=$((version+1))
echo "$version"
echo $version > versioncode.txt
This file is called "test.sh". On the commandline i ran following: "bash test.sh". The output and the error is this:
niklasraab@DESKTOP-BLJGB4D:/mnt/c/Flutter/src/hapii$ bash test.sh
1
")syntax error: invalid arithmetic operator (error token is "
1
niklasraab@DESKTOP-BLJGB4D:/mnt/c/Flutter/src/hapii$
Problem is that i am getting the "invalid arithmetic operator" error. I am running this project on windows. With bash subsystem ubuntu installed.