BASH Articles

Creating a config file and using it in tandem with your scripts

In this article, we are going to create a config file and use it in our shell script. Prerequisites Besides having a terminal open, you need basic knowledge of creating scripts and config files. Write script Now, we are going to create a script and config file. The...

Calculating and reducing the runtime of a script

In this article, we are going to learn how to calculate and reduce the script’s runtime. A simple time command will help in calculating the execution time. Prerequisites Besides having a terminal open, make sure you have the necessary scripts present in your system....

Using Bash to monitor battery life and optimize it

In this article, we will learn about the TLP Linux tool. TLP is a command-line tool; it is used for power management and will optimize the battery life. Prerequisites Besides having a Terminal open, you need to ensure that you have TLP installed on...

Creating a simple NAT and DMZ firewall using bash script

In this article, we will create a simple NAT firewall with DMZ using iptables. Prerequisites Besides having a Terminal open, you need to ensure that iptables is installed in your machine. Write script We will write a script to set up a DMZ...