How to instal/setup XMLStarlet in Linux?

13,887

For Ubuntu:

sudo apt-get update
sudo apt-get install xmlstarlet

For CentOS: It is present in epel repo, download the repo and enable it

sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Confirm if it is enabled or not

cd /etc/yum.repos.d
grep -re enabled=1

This should show

epel.repo:enabled=1

Then Download xmlstarlet

sudo yum -y install xmlstarlet
Share:
13,887
Rishi
Author by

Rishi

Updated on June 09, 2022

Comments

  • Rishi
    Rishi about 2 years

    I'm fairly new to Linux and shell scripting; and have a requirement to parse and query an xml. I was able to find and use XML starlet for Windows successfully.

    However, my goal is to have that run on Linux via a shell script.

    Can anyone please share the steps to install and configure XMLStarlet on Linux?

    Thanks!