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

ShellCheck – Analyse, Show Suggestions and Warnings For Shell Scripts

ShellCheck - Analyse, Show Suggestions and Warnings For Shell Scripts

Shell scripts are an important part of Linux systems. Most of the daily jobs and general jobs are done with shell scripts. The ShellCheck is a static analysis tool created to analyze the provided shellcode and give suggestions for better shell scripts and show warnings for some errors. The ShellCheck can be installed into all … Read more

$0 Script File Name Parameter Usage In Linux Bash

$0 Script File Name Parameter Usage In Linux Bash

Bash provides different parameters to get input from different sources. $0 is a special parameter that is used to store the name of the bash script. This $0 parameter is automatically assigned by the bash or bash interpreter and can not be changed in a script file like a regular variable. This makes it a … Read more