INNER CODE UNIT · Vim script

arr

chxuan/vimplus · install.sh:145

    arr=(${line//=/ })
    version=(${arr[1]//./ })

    echo ${version[0]}
}

# 获取alpine版本
function get_alpine_version()
{
    version=$(cat /etc/os-release | grep 'VERSION_ID' | awk -F '=' '{print $2}')
    
    echo $version
}

# 获取centos版本
function get_centos_version()
{
    version=`cat /etc/redhat-release | awk '{print $4}' | awk -F . '{printf "%s",$1}'`

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…