Linux echo Command Usage In Bash Script

Linux provides the echo command in order to print given text or string into the command line interface. The echo command can be used in different shell environments like Bash, Csh, etc. We can use the echo command in the bash interactive shell or in a bash script. The usage of the echo command in … Read more

For Loop In Bash Script

For Loop In Bash Script

Linux Bash Shell provides the For Loop in order to iterate over the given array, list, string, etc. For loops are very useful for iterative operations and heavily used in Linux bash shells. In this tutorial, we examine different ways and examples to use for loops in the Bash shell. for Loop Syntax The bash … Read more

What Does “set -e” In Bash?

What Does "set -e" In Bash?

Linux bash provides a very good programming environment where scripts and functions can be created and executed. If there is an error related to a script file or function bash ignores these errors by default. But if we rely on the script or function execution and get detailed information about the result the set -e … Read more

Bash if..else Statement Tutorial In Linux

Bash if..else Statement Tutorial In Linux

Linux Bash provides the if, if..else , if..elif..else statements in order to execute code according to the specific condition. By using these if statements we can branch the code execution easily. The if statements provide different cases where we examine all of them in this tutorial. if Statement The if statement can be used to … Read more

How To Create and Run Bash Script?

How To Create and Run Bash Script?

Bash is a Unix and Linux shell and command interface language. The bash was released in 1989 with the GNU project. The Bash became popular with Linux and related distributions like Ubuntu, Debian, CentOS, RHEL, etc. Bash provides a very useful command-line interface with complete scripting language features. Linux commands can be executed via the … Read more

Make Bash Shell Safe with “set -euxo pipefail”

Make Bash Shell Safe with "set -euxo pipefail"

Linux Bash provides the scripting capabilities which is very familiar with programming languages. By using the Bash shell complex applications can be developed. For example, years ago a lot of CGI web applications are developed with the Linux Bash scripting language. But while developing bash scripts there are a lot of pitfalls because it is … Read more

How To Make Bash Script Executable with chmod?

How To Make Bash Script Executable with chmod?

Linux script files are very useful to execute multiple commands again and again. They are a very practical way to executed multiple commands. But in order to run a script file, it should be executable. By default when a script file is created it is not executable. In order to make it executable, the chmod … Read more

How To Increment Variable In Bash Shell and Script?

How To Increment Variable In Bash Shell and Script?

Linux Bash Shell is a complete shell with programming features. The bash shell provides variables and arithmetic operations like sum, divide, etc. The bash shell variables can be incremented in different ways. This incrementation operation can be done in different ways. In this tutorial, we will learn different ways to increment or increase a variable … Read more

How To Run Shell Script (.sh File) In Linux?

How To Run Shell Script (.sh File) In Linux?

The Bash and Bash Shell is the main management component for the Linux systems. Commands run on bash in order to complete tasks or jobs. These commands can be stored in a file which is called a shell script. The shell script is used to run single or more commands by just calling the shell … Read more