Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Script1.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
!/bin/bash
#This is my 1st shell script to print output
echo "Hello All, Welcome to AWS/Devops Class"
echo "Hello, How are you?"
echo "Samiksha"
echo "Vikas"
echo "Welcome to Young Minds"
24 changes: 2 additions & 22 deletions Script12.sh
Original file line number Diff line number Diff line change
@@ -1,40 +1,20 @@
#!/bin/bash
#this script is for if-elif-fi
echo "Please enter value of a"
read a
echo "Please enter vaule of b"
read b
if [ $a == $b ]
then
echo "a is equal to b"
elif [ $a -gt $b ]
then
echo "a is greater than b"
elif [ $a -lt $b ]
then
echo "a is less than b"
else
echo "None of the condition met"
fi
root@ip-172-31-42-137:~/scripts/shellscripts# ^C
root@ip-172-31-42-137:~/scripts/shellscripts# cat script12.sh
#!/bin/sh
a="abc"
b="efg"

if [ $a = $b ]
then
echo "$a = $b : a is equal to b"
else
echo "$a = $b: a is not equal to b"
echo "$a != $b: a is not equal to b"
fi


if [ $a != $b ]
then
echo "$a != $b : a is not equal to b"
else
echo "$a != $b: a is equal to b"
echo "$a = $b: a is equal to b"
fi


Expand Down
2 changes: 1 addition & 1 deletion Script13.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ $a != $b ]
then
echo "$a != $b : a is not equal to b"
else
echo "$a != $b: a is equal to b"
echo "$a = $b: a is equal to b"
fi

if [ $a -lt 100 -a $b -gt 15 ]
Expand Down
2 changes: 2 additions & 0 deletions Script2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ echo "Value of b"
read b
echo "Hello value of a is $a and value of b is $b"
echo "This is sample change"
echo "bye"
echo "hi"