fix syntax

This commit is contained in:
FastFingertips
2021-12-22 08:21:15 +03:00
parent 804a59853e
commit db20252cfc
13 changed files with 19 additions and 12 deletions

View File

@ -5,6 +5,7 @@
#Modified Date: #Modified Date:
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Please enter some value: \c" echo -e "Please enter some value: \c"
read -r a read -r a
echo -e "Please enter another value: \c" echo -e "Please enter another value: \c"

View File

@ -5,6 +5,7 @@
#Modified Date: #Modified Date:
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Please Enter Maths Marks: \c" echo -e "Please Enter Maths Marks: \c"
read -r m read -r m
echo -e "Please Enter Physics Marks: \c" echo -e "Please Enter Physics Marks: \c"

View File

@ -6,6 +6,7 @@
#WebSite: https://arkit.co.in #WebSite: https://arkit.co.in
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
fruits=( "Apple" "Orange" "Banana" "Sapota" ) fruits=( "Apple" "Orange" "Banana" "Sapota" )
fruits[3]='Green Apple' fruits[3]='Green Apple'
for fruit in ${fruits[@]} for fruit in ${fruits[@]}

View File

@ -7,7 +7,7 @@
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo "WEL COME TO $USER" echo "WEL COME TO $USERNAME"
echo "Your present working directory is `pwd`" echo "Your present working directory is `pwd`"
echo "current logged in users are `who`" echo "current logged in users are `who`"
echo "Today date is `date`" echo "Today date is `date`"

8
hi.sh
View File

@ -9,13 +9,13 @@
tmp=`date | cut -c12-13` tmp=`date | cut -c12-13`
if [ $tmp -lt 11 ] ; then if [ $tmp -lt 11 ] ; then
echo "Good Mornind have a nice day $USER" echo "Good Mornind have a nice day $USERNAME"
elif [ $tmp -gt 11 -a $tmp -lt 16 ] ; then elif [ $tmp -gt 11 -a $tmp -lt 16 ] ; then
echo "Good Ofter noon $USER" echo "Good Ofter noon $USERNAME"
elif [ $tmp -gt 15 -a $tmp -lt 19 ] ; then elif [ $tmp -gt 15 -a $tmp -lt 19 ] ; then
echo "Good Evening $USER" echo "Good Evening $USERNAME"
else else
echo "Good Night Sweet dreams $USER" echo "Good Night Sweet dreams $USERNAME"
fi fi
echo "Now the time is `date |cut -c12-19`" echo "Now the time is `date |cut -c12-19`"

View File

@ -5,6 +5,7 @@
#Modified Date: #Modified Date:
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Please Enter a Value: \c" echo -e "Please Enter a Value: \c"
read -r a read -r a
echo -e "Please Enter b Value: \c" echo -e "Please Enter b Value: \c"

View File

@ -6,7 +6,7 @@
#Website: https://arkit.co.in #Website: https://arkit.co.in
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Enter any value> \c" echo -e "Enter any value: \c"
read -r a read -r a
echo -e "Enter any value: \c" echo -e "Enter any value: \c"
read -r b read -r b

View File

@ -10,8 +10,8 @@
echo "Hi you there" echo "Hi you there"
echo "what is your name? (Type your name here and press Enter)" echo "what is your name? (Type your name here and press Enter)"
read NM read NM
echo "Hi $NM Good Morning" echo "Hi $NM Good Morning"
echo "your currently logged in as $USER" echo "your currently logged in as $USERNAME"
echo "your present working directory is `pwd`" echo "your present working directory is `pwd`"
# END # # END #

View File

@ -7,7 +7,7 @@
#Modified by: #Modified by:
# START # START
echo "Welcome $USER" echo "Welcome $USERNAME"
echo "Your present working directory is `pwd`" echo "Your present working directory is `pwd`"
echo "Today date is `date`" echo "Today date is `date`"
# END # END

View File

@ -5,6 +5,7 @@
#Modified Date: #Modified Date:
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Please Enter Maths Marks: \c" echo -e "Please Enter Maths Marks: \c"
read -r m read -r m
echo -e "Please Enter Physics Marks: \c" echo -e "Please Enter Physics Marks: \c"

View File

@ -5,7 +5,8 @@
#Modified Date: #Modified Date:
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
echo -e "Enter First Numberic Value: \c"
echo -e "Enter First Numeric Value: \c"
read -r t read -r t
echo -e "Enter Second Numeric Value: \c" echo -e "Enter Second Numeric Value: \c"
read -r b read -r b
@ -13,7 +14,7 @@ read -r b
if [ $t -le 20 -o $b -ge 30 ]; then if [ $t -le 20 -o $b -ge 30 ]; then
echo "Statement is True" echo "Statement is True"
else else
echo "Flase, Statement Try Again." echo "False Statement, Try Again."
fi fi
# END # # END #

View File

@ -5,7 +5,7 @@
##WebSite: https://arkit.co.in ##WebSite: https://arkit.co.in
##Start ##Start
echo "Please Enter User name you want check:\c" echo -e "Please Enter User name you want check: \c"
read user read user
grep $user /etc/passwd > /dev/null grep $user /etc/passwd > /dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then

View File

@ -6,6 +6,7 @@
#website: https://arkit.co.in #website: https://arkit.co.in
#Author: Ankam Ravi Kumar #Author: Ankam Ravi Kumar
# START # # START #
A=10 A=10
Ba=23 Ba=23
BA=45 BA=45