Value too great for base (error token is “09”)

后端 未结 6 1670
我寻月下人不归
我寻月下人不归 2020-11-27 06:31

When running this part of my bash script am getting an error

Script

value=0
for (( t=0; t <= 4; t++ ))
do
d1=${filedates[$t]}
d2=${filedates[$t+1]         


        
6条回答
  •  我在风中等你
    2020-11-27 07:32

    The fowllowing code occur the same error , I don't know why, but already solved it:

    24    echo $currentVersion
    25    if [[ $currentVersion -eq "" ]];then
    26       echo "$projectName=$version">>$modulepath
    27    else
    28       sed  -i "s/^$projectName=$currentVersion/$projectName=$version/g"  $modulepath
    29    fi
    

    ERROR INFO:

    b26044fb99c28613de9903db3a50cbb11f0de9c7 1e5d11c9923045cc43f5fdde07f186b6dd5ca1b4
    /data/ext/tbds_ci_build/tbds_build_common.sh: line 25: [[: b26044fb99c28613de9903db3a50cbb11f0de9c7
    1e5d11c9923045cc43f5fdde07f186b6dd5ca1b4: value too great for base (error token is "1e5d11c9923045cc43f5fdde07f186b6dd5ca1b4")
    sed: -e expression #1, char 63: unterminated `s' command
    

    Fix:

    Make $currentVersion do not contain 2 values like "a b", just 1 value "a" .
    

提交回复
热议问题