Question: PLease write below Steps for given Shel Script.. I need Screenshot for each step Basic script to display the content using echo Variables script to

PLease write below Steps for given Shel Script..
I need Screenshot for each step
Basic script to display the content using echo
Variables script to display:
User Input
Conditional Script:
Greater than, less than, equal to comparison script
Loop script:
File handling Script
Function script
Case statement Script:
Arithmetic Operations
Arithmetic operations using expr
Positional Parameters
Loops
IF-else loop
Do-while loop
Looping through array elements
Searching in array
SHEL SCRIPT:
#!/bin/bash
#echo "First Bash
fname=rajco
lname=siva
echo "welcome to ncpl $fname $lname"
-----------------
#!/bin/bash
#echo "First Bash
echo "enter the fname"
read fname
echo "enter the lname"
read lname
echo "welcome to ncpl $fname $lname"
------------------
#!/bin/bash
#echo "First Bash
fname=$1
lname=$2
echo "welcome to ncpl $fname $lname"
---------------
#!/bin/bash
num1=20
num2=230
num3=`expr $num1+ $num2` or num3=$(($num1+ $num2)) or num3=$(expr $num1+ $num2)
echo $num3
-------------------------------------------
#!/bin/bash
count=5
count=`expr $count +1`
echo $count
-------------------------
x=10
y=20
# matching numbers with '='
res=`expr $x = $y`
echo $res
# displays 1 when arg1 is less than arg2
res=`expr $x \< $y`
echo $res
# display 1 when arg1 is not equal to arg2
res=`expr $x \!= $y`
echo $res
--------------------------------
#!/bin/bash
# reading data from the user
read -r -p "Enter a: " a
read -r -p "Enter b: " b
add=$((a+b))
echo "Addition of a and b are: "${add}
sub=$((a-b))
echo "Subtraction of a and b are: "${sub}
mul=$((a*b))
echo "Multiplication of a and b are: "${mul}
div=$((a/b))
echo "Division of a and b are: "${div}
mod=$((a%b))
echo "Modulis of a and b are: "${mod}
((++a))
echo "Increment operator when applied on $a results into a :""${a}"
((--b))
echo "Decrement operator when applied on 'b' results into b :""${b}"
---------------------------------
#!/bin/bash
#reading data from the user
read -p 'Enter a : ' a
read -p 'Enter b : ' b
if(( $a==$b ))
then
echo a is equal to b.
else
echo a is not equal to b.
fi
if(( $a!=$b ))
then
echo a is not equal to b.
else
echo a is equal to b.
fi
if(( $a<$b ))
then
echo a is less than b.
else
echo a is not less than b.
fi
if(( $a<=$b ))
then
echo a is less than or equal to b.
else
echo a is not less than or equal to b.
fi
if(( $a>$b ))
then
echo a is greater than b.
else
echo a is not greater than b.
fi
if(( $a>=$b ))
then
echo a is greater than or equal to b.
else
echo a is not greater than or equal to b.
fi
----------------------------------
#!/bin/bash
#reading data from the user
read -p 'Enter a : ' a
read -p 'Enter b : ' b
if(($a == "true" & $b == "true" ))
then
echo Both are true.
else
echo Both are not true.
fi
if(($a == "true" || $b == "true" ))
then
echo Atleast one of them is true.
else
echo None of them is true.
fi
if((! $a == "true" ))
then
echo "a" was initially false.
else
echo "a" was initially true.
fi
----------------------
#!/bin/bash
#reading data from the user
read -p 'Enter a : ' a
read -p 'Enter b : ' b
if(($a == "true" & $b == "true" ))
then
echo Both are true.
else
echo Both are not true.
fi
if(($a == "true" || $b == "true" ))
then
echo Atleast one of them is true.
else
echo None of them is true.
fi
if((! $a == "true" ))
then
echo "a" was initially false.
else
echo "a" was initially true.
fi
----------------------
#!/bin/bash
#reading data from the user
read -p 'Enter a : ' a
read -p 'Enter b : ' b
bitwiseAND=$(( a&b ))
echo Bitwise AND of a and b is $bitwiseAND
bitwiseOR=$(( a|b ))
echo Bitwise OR of a and b is $bitwiseOR
bitwiseXOR=$(( a^b ))
echo Bitwise XOR of a and b is $bitwiseXOR
bitiwiseComplement=$(( ~a ))
echo Bitwise Compliment of a is $bitiwiseComplement
leftshift=$(( a<<1))
echo Left Shift of a is $leftshift
rightshift=$(( b>>1))
echo Right Shift of b is $rightshift
--------------------
expr length "rajco" "<"5"|"19-6">"10
----------------
x=rajco
len=`expr length $x`
echo $len
-------------------
:1,$d
-----------------
#!/bin/bash
echo "Enter the value a"
read a
if [ $a -lt 10]
then
echo "$a is leass than 10"
fi
--------------------------------
I need Screenshots please for all above steps..

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!