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
How do I run a script on mac?
What are types of shells?
What is awk script?
Give some situations where typing error can destroy a program?
Differentiate between ‘ and ” quotes.
Write down the syntax for all the loops in shell scripting.
How to debug the problems encountered in the shell script/program?
What is shell application?
What language is used in terminal?
How do I run a script from command prompt?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
Can we run shell script in windows?
How do I stop script errors?
What is sudo command?
What is a shell script? Can you name some of its advantages?