Write a shell program to test whether a given number is even
or odd?
Answer Posted / santana20142003
$ echo <number> | nawk '{ if($0 % 2 ==0) print $0 "Even
Number" ;\
else print $0 "Odd Number"}'
| Is This Answer Correct ? | 24 Yes | 17 No |
Post New Answer View All Answers
What is in a script?
How do I run a powershell script?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
What is shell environment?
How can I send a mail with a compressed file as an attachment?
Which is better perl or shell scripting?
How do I save a powershell script?
What is a file basename?
What are the zombie processes?
What is sed in shell script?
What is the significance of the shebang line in shell scripting?
What is the command to find out users on the system?
What is shell terminal?
What is the first line in every perl script called?
What exactly is a shell?