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 login shell?
What does path stand for?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..
What is @echo off?
Write a script to print the first 10 elements of fibonacci series.
Can you write a script to portray how set –x works?
How do you find out What is your shell?
How to use arguments in a script?
How do we delete all blank lines in a file?
What does $@ mean in shell?
Explore about environment variables?
what is tickets $ what low,medium,high priorite pls define time also
Why should we use shell scripts?
How will you connect to a database server from linux?
How will you print the login names of all users on a system?