Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3ef5e6

Browse files
authored
Merge pull request techarkit#8 from FastFingertips/FOTV
Update while-loop.sh
2 parents b8003a2 + db20252 commit b3ef5e6

15 files changed

+29
-20
lines changed

Arthemetic-Operators.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#Modified Date:
66
#Author: Ankam Ravi Kumar
77
# START #
8+
89
echo -e "Please enter some value: \c"
910
read -r a
1011
echo -e "Please enter another value: \c"

agtb.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
#Author: Ankam Ravi Kumar
88
# START #
99

10-
echo "enter the a vloue $a"
10+
echo -e "enter the a value: \c"
1111
read a
12-
echo "enter the b volue $b"
12+
echo -e "enter the b value: \c"
1313
read b
1414
if test "$a" -gt "$b" ; then
1515
echo "$a is greater than $b"
1616
else
17-
echo "$b is greater than $a"
17+
echo "$b is greater than $a"
1818
fi
1919

2020
# END #

arkit.co.in-nested-if.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#Modified Date:
66
#Author: Ankam Ravi Kumar
77
# START #
8+
89
echo -e "Please Enter Maths Marks: \c"
910
read -r m
1011
echo -e "Please Enter Physics Marks: \c"

array.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#WebSite: https://arkit.co.in
77
#Author: Ankam Ravi Kumar
88
# START #
9+
910
fruits=( "Apple" "Orange" "Banana" "Sapota" )
1011
fruits[3]='Green Apple'
1112
for fruit in ${fruits[@]}

details.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#Author: Ankam Ravi Kumar
88
# START #
99

10-
echo "WEL COME TO $USER"
10+
echo "WEL COME TO $USERNAME"
1111
echo "Your present working directory is `pwd`"
1212
echo "current logged in users are `who`"
1313
echo "Today date is `date`"

hi.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
tmp=`date | cut -c12-13`
1111
if [ $tmp -lt 11 ] ; then
12-
echo "Good Mornind have a nice day $USER"
12+
echo "Good Mornind have a nice day $USERNAME"
1313
elif [ $tmp -gt 11 -a $tmp -lt 16 ] ; then
14-
echo "Good Ofter noon $USER"
14+
echo "Good Ofter noon $USERNAME"
1515
elif [ $tmp -gt 15 -a $tmp -lt 19 ] ; then
16-
echo "Good Evening $USER"
16+
echo "Good Evening $USERNAME"
1717
else
18-
echo "Good Night Sweet dreams $USER"
18+
echo "Good Night Sweet dreams $USERNAME"
1919
fi
2020
echo "Now the time is `date |cut -c12-19`"
2121

if-elif-if.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#Modified Date:
66
#Author: Ankam Ravi Kumar
77
# START #
8+
89
echo -e "Please Enter a Value: \c"
910
read -r a
1011
echo -e "Please Enter b Value: \c"

if-else-statement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#Website: https://arkit.co.in
77
#Author: Ankam Ravi Kumar
88
# START #
9-
echo -e "Enter any value> \c"
9+
echo -e "Enter any value: \c"
1010
read -r a
1111
echo -e "Enter any value: \c"
1212
read -r b

info.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
echo "Hi you there"
1111
echo "what is your name? (Type your name here and press Enter)"
1212
read NM
13-
echo "Hi $NM Good Morning"
14-
echo "your currently logged in as $USER"
13+
echo "Hi $NM Good Morning"
14+
echo "your currently logged in as $USERNAME"
1515
echo "your present working directory is `pwd`"
1616

1717
# END #

myfirstscript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#Modified by:
88

99
# START
10-
echo "Welcome $USER"
10+
echo "Welcome $USERNAME"
1111
echo "Your present working directory is `pwd`"
1212
echo "Today date is `date`"
1313
# END

nestedif.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#Modified Date:
66
#Author: Ankam Ravi Kumar
77
# START #
8+
89
echo -e "Please Enter Maths Marks: \c"
910
read -r m
1011
echo -e "Please Enter Physics Marks: \c"

or-operator.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
#Modified Date:
66
#Author: Ankam Ravi Kumar
77
# START #
8-
echo -e "Enter First Numberic Value: \c"
8+
9+
echo -e "Enter First Numeric Value: \c"
910
read -r t
1011
echo -e "Enter Second Numeric Value: \c"
1112
read -r b
1213

1314
if [ $t -le 20 -o $b -ge 30 ]; then
1415
echo "Statement is True"
1516
else
16-
echo "Flase, Statement Try Again."
17+
echo "False Statement, Try Again."
1718
fi
1819

1920
# END #

userexists.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
##WebSite: https://arkit.co.in
66

77
##Start
8-
echo "Please Enter User name you want check:\c"
8+
echo -e "Please Enter User name you want check: \c"
99
read user
1010
grep $user /etc/passwd > /dev/null
1111
if [ $? -eq 0 ]; then

variables.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#website: https://arkit.co.in
77
#Author: Ankam Ravi Kumar
88
# START #
9+
910
A=10
1011
Ba=23
1112
BA=45

while-loop.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
While Loop Example, print any given number table.
2-
31
#!/bin/bash
4-
## While Loop Example with 2 table
5-
echo -e "Please provide one value:\c"
2+
# While Loop Example with 2 table, print any given number table.
3+
# See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)
4+
5+
#START
6+
7+
echo -e "Please provide one value: \c"
68
read -r c
79
i=1
810
while [ $i -le 10 ]
@@ -12,4 +14,4 @@ echo "$c * $i = $b"
1214
i=`expr $i + 1`
1315
done
1416

15-
See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit?sub_confirmation=1)
17+
#END

0 commit comments

Comments
 (0)