Tag: bash

This article will show you how to compare floating point number in bash. Here are my shared experiences while working with the Linux system. Compare 2 common numbers Usually, we compare two integer numbers. For example, we have 2 numbers as follows: $ NUM1=2 $ NUM2=1 And to compare these two numbers in Linux, we

Now is the last step in 3 steps how to write a bash script file. This article will learn about the script file location and script execution. The execution of the script sounds very simple, but sometimes, you don’t understand why it doesn’t work as expected. Script file location Normally, when you write and assign the

After you’ve read the steps to write a bash script file, what’s in that bash script file? What is the format of a bash script file? “Hello World” script To keep things simple and familiar, I’ll start with a script called “Hello World”. This is probably a type of file that you will probably encounter

In this article, I will show you how to control iptables in the bash script. Iptables is a firewall that is built into almost all Linux operating systems. Using it makes your system a more secure layer. Controlling the iptables service and its rules manually, most people have done. But sometimes, iptables needs to work