This is the tutorial about operators in bash, how to use operator in shell script, basic operators in shell scripting, how to use and operator in shell script, how to use arithmetic…
Category: Bash Script
How to use Command Line Arguments in Bash
BASH SCRIPT – COMMAND LINE ARGUMENTS (POSITIONAL PARAMETERS) – In this tutorial, you will learn how to take command line arguments in shell script with examples. S.N POSITIONAL PARAMETERS DESCRIPTION 1. $0…
How to use Strings in Bash Script
BASH SCRIPT – In this tutorial, you will understand how to use strings in shell script, string operations in bash, bash string comparison, bash string comparison not equal, bash string equals, bash…
How to use Function in Bash Scripting
SHELL FUNCTION – In this tutorial, you will learn function in bash script, function in shell script, function in shell script with arguments, shell script function with parameters and return value with…
How to use Array in Bash Script
BASH ARRAY – In this shell tutorial, you will learn how to create an array for homogenous and heterogeneous type, index based array creation, displaying linux commands using array. Syntax Where, Example…
How to use file test operators in shell scripting tutorial – Elango Notes
In this tutorial, you will learn how to check file exists, directory exists using file test operators with shell scripting tutorial in linux / unix. Three Operations 1. Checking File / Directory…
Read File Line By Line in Bash Scripting
In this shell scripting, file contents can be displayed line by line using while loop and word by word using for loop. Two Operations 1. Reading File Contents Line by Line via…
How to use Case Statements in Shell Script
Case Statements (Switch Statements) Usage Syntax case <variable> in Pattern 1) Commands / statements ;; Pattern 2) Commands / statements ;; … *) ;; easc Where, EXAMPLE SCRIPT…
How to use Command Substitution in Bash Script
Shell Script Command Substitution Approach 1 Syntax variable-name=$(command expression) Example k=$(date) NOTE Approach 2 Syntax variable-name=`command expression` Example k=`date` I. EXAMPLE OF LISTING FILES AND SUB FOLDERS OF CURRENT DIRECTORY VIA COMMAND…
How to Use For Loop in Shell Script (Linux Bash)
Shell Scripting Tutorial For Loop 1. Simple for loop (Data based for loop) Syntax for variable in data do # code done Where, variable is an user defined variable. Example 1 –…