How To Install mawk on Debian 10

Learn how to install mawk on Debian 10 with this tutorial. mawk is a pattern scanning and text processing language

Introduction

In this tutorial we learn how to install mawk on Debian 10.

What is mawk

mawk is:

Mawk is an interpreter for the AWK Programming Language. The AWK language is useful for manipulation of data files, text retrieval and processing, and for prototyping and experimenting with algorithms. Mawk is a new awk meaning it implements the AWK language as defined in Aho, Kernighan and Weinberger, The AWK Programming Language, Addison-Wesley Publishing, 1988. (Hereafter referred to as the AWK book.) Mawk conforms to the POSIX 1003.2 (draft 11.3) definition of the AWK language which contains a few features not described in the AWK book, and mawk provides a small number of extensions.

Mawk is smaller and much faster than gawk. It has some compile-time limits such as NF = 32767 and sprintf buffer = 1020.

There are three methods to install mawk on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install mawk Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install mawk using apt-get by running the following command:

sudo apt-get -y install mawk

Install mawk Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install mawk using apt by running the following command:

sudo apt -y install mawk

Install mawk Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install mawk using aptitude by running the following command:

sudo aptitude -y install mawk

How To Uninstall mawk on Debian 10

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

sudo apt-get remove mawk

Uninstall mawk And Its Dependencies

To uninstall mawk and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove mawk

Remove mawk Configurations and Data

To remove mawk configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge mawk

Remove mawk configuration, data, and all of its dependencies

We can use the following command to remove mawk configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge mawk

Dependencies

mawk have the following dependencies:

References

Summary

In this tutorial we learn how to install mawk package on Debian 10 using different package management tools: apt, apt-get and aptitude.