title: How to get the value of variables in centos7 repo file?
body: <pre><code>cat /etc/yum.repos.d/CentOS-Base.repo
  </code></pre>
  
  <p>The following lines were displayed,it is a shell script.</p>
  
  <pre><code>[base]
  name=CentOS-$releasever - Base
  mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=os&amp;infra=$infra
  #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
  gpgcheck=1
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  </code></pre>
  
  <p>To input <code>echo $releasever</code> in terminal,nothing output in the screen.</p>
  
  <p>How to get the value of $releasever ,$arch,$basearch ?</p>