awk读取.ini配置文件中的某段

  1. [base]
    name=os_repo
    baseurl=https://xxx/centos/$releasever/os/$basearch
    gpgcheck=0

    enable=1

    [mysql]
    name=mysql_repo
    baseurl=https://xxx/mysql-repo/yum/mysql-5.7-community/el/$releasever/$basearch

    gpgcheck=0
    enable=1

    [epel]
    name=epel_repo
    baseurl=https://xxx/epel/$releasever/$basearch
    gpgcheck=0
    enable=1
    [percona]
    name=percona_repo
    baseurl = https://xxx/percona/release/$releasever/RPMS/$basearch
    enabled = 1
    gpgcheck = 0

awk读取.ini配置文件中的某段 - 图1