Search This Blog

Saturday, September 30, 2023

Shell script 1

If condition

Example:

echo "Please provide the user name and state name"

read name state_name

echo "User provided name is :$name and His state name is : $state_name "

if [ "$state_name" =  "Andra" ]; then

        echo "$name speaks Telugu"

else

        echo "$name does not speak Telugu"

fi


Output:

Please Provide the user name and state name

Balakrishna andra

User provided name is :Balakrishna and His state name is : andra

Balakrishna speaks Telugu

No comments:

Post a Comment

What is the sanity checks you have done for STA?

 Sanity checks for STA: Linking Checks: We need to check., is there any missing modules or missing pins in a library. this is done by link c...