Write a shell program to test whether a given number is even
or odd?
Answer Posted / kushal
echo 10|awk '{ if($0 % 2 == 0) print "Even Number"; else
print"Odd Number"}'
tested and certified one liner answer
| Is This Answer Correct ? | 28 Yes | 17 No |
Post New Answer View All Answers
Explain about the exit command?
What will happen to my current process when I execute a command using exec?
What is the best scripting language?
What is path in shell script?
What is shell variable?
How will you pass and access arguments to a script in linux?
What is the lifespan of a variable inside a shell script?
Is scripting and coding the same thing?
How to debug the problems encountered in the shell script/program?
What are the different types of commonly used shells on a typical linux system?
What is console line?
What is sh in shell script?
How can I send a mail with a compressed file as an attachment?
State the advantages of shell scripting?
What is a shell environment?