File tree Expand file tree Collapse file tree 15 files changed +29
-20
lines changed Expand file tree Collapse file tree 15 files changed +29
-20
lines changed Original file line number Diff line number Diff line change 5
5
# Modified Date:
6
6
# Author: Ankam Ravi Kumar
7
7
# START #
8
+
8
9
echo -e " Please enter some value: \c"
9
10
read -r a
10
11
echo -e " Please enter another value: \c"
Original file line number Diff line number Diff line change 7
7
# Author: Ankam Ravi Kumar
8
8
# START #
9
9
10
- echo " enter the a vloue $a "
10
+ echo -e " enter the a value: \c "
11
11
read a
12
- echo " enter the b volue $b "
12
+ echo -e " enter the b value: \c "
13
13
read b
14
14
if test " $a " -gt " $b " ; then
15
15
echo " $a is greater than $b "
16
16
else
17
- echo " $b is greater than $a "
17
+ echo " $b is greater than $a "
18
18
fi
19
19
20
20
# END #
Original file line number Diff line number Diff line change 5
5
# Modified Date:
6
6
# Author: Ankam Ravi Kumar
7
7
# START #
8
+
8
9
echo -e " Please Enter Maths Marks: \c"
9
10
read -r m
10
11
echo -e " Please Enter Physics Marks: \c"
Original file line number Diff line number Diff line change 6
6
# WebSite: https://arkit.co.in
7
7
# Author: Ankam Ravi Kumar
8
8
# START #
9
+
9
10
fruits=( " Apple" " Orange" " Banana" " Sapota" )
10
11
fruits[3]=' Green Apple'
11
12
for fruit in ${fruits[@]}
Original file line number Diff line number Diff line change 7
7
# Author: Ankam Ravi Kumar
8
8
# START #
9
9
10
- echo " WEL COME TO $USER "
10
+ echo " WEL COME TO $USERNAME "
11
11
echo " Your present working directory is ` pwd` "
12
12
echo " current logged in users are ` who` "
13
13
echo " Today date is ` date` "
Original file line number Diff line number Diff line change 9
9
10
10
tmp=` date | cut -c12-13`
11
11
if [ $tmp -lt 11 ] ; then
12
- echo " Good Mornind have a nice day $USER "
12
+ echo " Good Mornind have a nice day $USERNAME "
13
13
elif [ $tmp -gt 11 -a $tmp -lt 16 ] ; then
14
- echo " Good Ofter noon $USER "
14
+ echo " Good Ofter noon $USERNAME "
15
15
elif [ $tmp -gt 15 -a $tmp -lt 19 ] ; then
16
- echo " Good Evening $USER "
16
+ echo " Good Evening $USERNAME "
17
17
else
18
- echo " Good Night Sweet dreams $USER "
18
+ echo " Good Night Sweet dreams $USERNAME "
19
19
fi
20
20
echo " Now the time is ` date | cut -c12-19` "
21
21
Original file line number Diff line number Diff line change 5
5
# Modified Date:
6
6
# Author: Ankam Ravi Kumar
7
7
# START #
8
+
8
9
echo -e " Please Enter a Value: \c"
9
10
read -r a
10
11
echo -e " Please Enter b Value: \c"
Original file line number Diff line number Diff line change 6
6
# Website: https://arkit.co.in
7
7
# Author: Ankam Ravi Kumar
8
8
# START #
9
- echo -e " Enter any value> \c"
9
+ echo -e " Enter any value: \c"
10
10
read -r a
11
11
echo -e " Enter any value: \c"
12
12
read -r b
Original file line number Diff line number Diff line change 10
10
echo " Hi you there"
11
11
echo " what is your name? (Type your name here and press Enter)"
12
12
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 "
15
15
echo " your present working directory is ` pwd` "
16
16
17
17
# END #
Original file line number Diff line number Diff line change 7
7
# Modified by:
8
8
9
9
# START
10
- echo " Welcome $USER "
10
+ echo " Welcome $USERNAME "
11
11
echo " Your present working directory is ` pwd` "
12
12
echo " Today date is ` date` "
13
13
# END
Original file line number Diff line number Diff line change 5
5
# Modified Date:
6
6
# Author: Ankam Ravi Kumar
7
7
# START #
8
+
8
9
echo -e " Please Enter Maths Marks: \c"
9
10
read -r m
10
11
echo -e " Please Enter Physics Marks: \c"
Original file line number Diff line number Diff line change 5
5
# Modified Date:
6
6
# Author: Ankam Ravi Kumar
7
7
# START #
8
- echo -e " Enter First Numberic Value: \c"
8
+
9
+ echo -e " Enter First Numeric Value: \c"
9
10
read -r t
10
11
echo -e " Enter Second Numeric Value: \c"
11
12
read -r b
12
13
13
14
if [ $t -le 20 -o $b -ge 30 ]; then
14
15
echo " Statement is True"
15
16
else
16
- echo " Flase, Statement Try Again."
17
+ echo " False Statement, Try Again."
17
18
fi
18
19
19
20
# END #
Original file line number Diff line number Diff line change 5
5
# #WebSite: https://arkit.co.in
6
6
7
7
# #Start
8
- echo " Please Enter User name you want check:\c"
8
+ echo -e " Please Enter User name you want check: \c"
9
9
read user
10
10
grep $user /etc/passwd > /dev/null
11
11
if [ $? -eq 0 ]; then
Original file line number Diff line number Diff line change 6
6
# website: https://arkit.co.in
7
7
# Author: Ankam Ravi Kumar
8
8
# START #
9
+
9
10
A=10
10
11
Ba=23
11
12
BA=45
Original file line number Diff line number Diff line change 1
- While Loop Example, print any given number table.
2
-
3
1
#! /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"
6
8
read -r c
7
9
i=1
8
10
while [ $i -le 10 ]
@@ -12,4 +14,4 @@ echo "$c * $i = $b"
12
14
i=` expr $i + 1`
13
15
done
14
16
15
- See Full Explanation of this above shell script [while loop](https://www.youtube.com/Techarkit ? sub_confirmation=1)
17
+ # END
You can’t perform that action at this time.
0 commit comments