Bash While Loop: An Easy Way to Print Odd Numbers from 1 to N

In this article you will learn how to create a while loop in Bash.

While loops are used in Bash scripting and in many other programming languages…

The loop will go through N numbers and print only the odd ones.

You will see how our script looks like if we hardcode the value of N in it, and then you will learn…