Results 1 to 4 of 4
  1. #1

    automate editing /etc/yum.conf

    Does anyone know how I can do the equivalent of this via a script:

    open /etc/yum.conf
    :%s/gpgcheck=1/#gpgcheck=1
    (this part comments out gpgcheck=1 throughout the file with a search/replace).

    Ideas? The script doesnt need to use vi, any search/replace option would work.

  2. #2
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082

  3. #3
    One small change:

    sed 's/gpgcheck=1/#gpgcheck=1/g' /etc/yum.conf > /tmp/001 && mv --reply=y /tmp/001 /etc/yum.conf
    Thank you.

  4. #4
    Join Date
    Dec 2004
    Location
    Canada
    Posts
    1,082

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •