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 to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
Please give me example of " at command , contrab command " how to use
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
Is it possible to substitute "ls" command in the place of "echo" command?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
How to use arguments in a script?
Write a command sequence to find all the files modified in less than 2 days and print the record count of each.
What is web script?
Give some situations where typing error can destroy a program?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
Is shell scripting difficult?
What does chmod do?
What is the syntax of while loop in shell scripting?
What are the types of script?
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l