mawk command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
mawk: command not found
or when using sudo you get the following error message
sudo: mawk: command not found
Solutions to mawk: command not found
How To Fix mawk: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu mawk is provided by mawk package.
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.
To fix this problem, we can install more using the command below.
sudo apt-get -y install mawk
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install mawk.
sudo apt -y install mawk
Or if you have aptitude installed you can use the following command.
sudo aptitude install mawk
Summary
In this tutorial we learn how to fix mawk command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.