How To Install argbash on CentOS 7

In this tutorial we learn how to install argbash on CentOS 7. argbash is Bash argument parsing code generator

Introduction

In this tutorial we learn how to install argbash on CentOS 7.

What is argbash

Argbash helps your shell scripts to accept arguments. You declare what arguments you want your script to accept and Argbash generates the shell code that parses them from the command-line and exposes passed values as shell variables. Help message is also generated, and helpful error messages are dispatched if the script is called with arguments that conflict with the interface.

We can use yum or dnf to install argbash on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install argbash.

Install argbash on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install argbash using yum by running the following command:

sudo yum -y install argbash

Install argbash on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install argbash using dnf by running the following command:

sudo dnf -y install argbash

How To Uninstall argbash on CentOS 7

To uninstall only the argbash package we can use the following command:

sudo dnf remove argbash

References

Summary

In this tutorial we learn how to install argbash on CentOS 7 using yum and dnf.