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
How will you print the login names of all users on a system?
What happens on a system call?
What are the types of script?
How to get script name inside a script?
Why do we write bin bash in shell scripts?
Why are shell scripts used?
What is shell company all about?
What are zombie processes?
What is the difference between bash and shell?
Is bash a shell script?
Is shell scripting useful?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
How do I run a shell script on a mac?
I want to connect to a remote server and execute some commands, how can I achieve this?
Please give me example of " at command , contrab command " how to use