mirror of
https://github.com/techarkit/shell-scripting-tutorial.git
synced 2025-08-05 18:45:27 +00:00
fixing typos
-c : Suppress trailing newline -e : for interpreting the user given input
This commit is contained in:
@ -6,9 +6,9 @@
|
|||||||
#Modified Date:
|
#Modified Date:
|
||||||
#Author: Ankam Ravi Kumar
|
#Author: Ankam Ravi Kumar
|
||||||
# START #
|
# START #
|
||||||
echo -c "Enter a number: \c"
|
echo -e "Enter a number: \c"
|
||||||
read -r a
|
read -r a
|
||||||
echo -c "Enter b number: \c"
|
echo -e "Enter b number: \c"
|
||||||
read -r b
|
read -r b
|
||||||
|
|
||||||
echo "1. Sum of values"
|
echo "1. Sum of values"
|
||||||
@ -16,7 +16,7 @@ echo "2. Substraction"
|
|||||||
echo "3. Multiplication"
|
echo "3. Multiplication"
|
||||||
echo "4. Division"
|
echo "4. Division"
|
||||||
echo "5. Modulo division"
|
echo "5. Modulo division"
|
||||||
echo -c "Enter Your Choice from above menu: \c"
|
echo -e "Enter Your Choice from above menu: \c"
|
||||||
read -r ch
|
read -r ch
|
||||||
case $ch in
|
case $ch in
|
||||||
1) echo "Sum of $a + $b = "`expr $a + $b`;;
|
1) echo "Sum of $a + $b = "`expr $a + $b`;;
|
||||||
|
Reference in New Issue
Block a user