Write a shell program to test whether a given number is even
or odd?
Answer Posted / rk
echo"enter number"
read n
set r=($n%2)
if(r eq-0)
then
echo "even number:$n"
else
echo "odd number:$n"
fi
Is This Answer Correct ? | 24 Yes | 16 No |
Post New Answer View All Answers
What is awk in shell scripting?
What's the difference between scripting and coding?
Explain about gui scripting?
How to get script name inside a script?
Is bash a shell script?
What are the different communication commands available in the shell?
What is web script?
one folder contains lot of students name but I want to fetch hello with every student name individually using shell script
What is the best shell scripting language?
Give some situations where typing error can destroy a program?
How do I run a shell script in powershell?
What is the default ubuntu terminal?
How many fields are present in a crontab file and what does each field specify?
What is shell and shell script?
Please give me example of " at command , contrab command " how to use