Shell Scripting

Using Loops (while, for) in awk scripts

The awk programming language contains many of the programming concepts that are used in shell scripting. Conditionals, such as the…

Beginners Guide to Using “trap” to Catch Signals and Handle Errors in Shell Script

Shell Signal Values A signal is a message that some abnormal event has taken place or a message requesting another…

How to Make a Variable read-only (constant) in Bash and Korn Shell

Creating Bourne Shell Constants A variable can be made read-only with the following syntax: readonly var[=value] The square brackets around…

Examples of “shift” Command in Shell Scripts

The shift Statement Sometimes a script does not require a specific number of arguments from users. Users are allowed to…

Korn Shell select Loop

The select statement in the Korn shell creates a menu. This construct is for the Korn shell only. The syntax…

How to use “break” and “continue” statements in shell scripts

The break Statement The break statement allows you to exit the current loop. It is often used in an if…

How to use until loop in Shell Scripts

The until Loop The until loop is very similar to the while loop, except that the until loop executes as…

“while” Loop Examples in Shell Scripts

The while loop allows you to repeatedly execute a group of statements while a command executes successfully. The syntax for…

6 Bash Shell Command Line Chaining Operators in Linux

Introduction In this article, I will explain you 6 Bash shell command line Chaining Operators (Linux operator). Now let’s discuss…

What are Shell Scripts? How to Create Shell Scripts?

What Is a Shell? A shell is a program that provides an interface between a user and an operating system…