Professional Documents
Culture Documents
Manual Install Gawk
Manual Install Gawk
Manual Install Gawk
1- Download the source code. You can download the source code for gawk from the official GNU
website or other trusted sources. Make sure to download the specific version you want to install.
2- Extract the source code. Once the source code is downloaded, you can extract it using the tar
command. For example, if the downloaded file is gawk-5.1.0.tar.gz, you can extract it using the
following command:
3- Navigate to the source code directory. Change your current directory to the extracted source code
directory. For example:
$ cd gawk-5.1.0
4- Configure the installation. Before compiling the source code, you need to configure the installation.
This step checks for dependencies and sets up the makefile for the compilation process. You can
specify the installation location using the –prefix option. For example, to install gawk in /opt/gawk-
5.1.0, you can run the following command:
$ ./configure --prefix=/opt/gawk-5.1.0
5- Compile the source code. After configuring the installation, you can compile the source code using
the make command:
$ make
6- Install gawk. Once the source code is compiled, you can install gawk using the make install
command:
$ make install
7- After the installation, rename executable /opt/gawk-5.1.0/bin/awk to awk5
$ cd /opt/gawk-5.1.0/bin
$ mv awk awk5
now you can run new gawk as awk5 and old one as awk