为bash脚本的输出添加+1

时间:2019-06-18 20:32:07

标签: bash

需要将+1添加到输出 例如下面的代码702应该为+1,即703

TARGET=1.2.702
CURRENT=1.32.700
echo $TARGET
echo $CURRENT

TARGET_BUILD_NUM=$(echo $TARGET | cut -d'.' -f3) # Need to +1 to this output 
CURRENT_BUILD_NUM=$(echo $CURRENT | cut -d'.' -f3)

echo $TARGET_BUILD_NUM ( should be 703 not 702 need to add +1)
echo $CURRENT_BUILD_NUM

0 个答案:

没有答案