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
How do I set bash as default shell mac?
Which shell is the best?
Explain about stdin, stdout and stderr?
How can the contents of a file inside jar be read without extracting in a shell script?
Why do we use shell scripting?
What is the default ubuntu terminal?
What does echo mean in scripting?
c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
What is path in shell script?
How to find all the files modified in less than 3 days and save the record in a text file?
Explain how you Automate your application using Shell scripting.
How do you find out What is your shell?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
What is bash command used for?