Shell Program for to find Odd or Even numbers on given Input, i tried this on Ubuntu Linux, These Shell Program is Been Saved with the extension of .sh,
Note : Refer How To Copy The Following Code From This Site:
- Content Stoling is prevented on this site.
- So Refer the Link to copy the below coding part by using this >>> link <<<
[sourcecode language=’css’]
echo “ODD OR EVEN NUMBER ”
echo “Enter the value:
read a
if [ [$a%2] –eq 0 ]
then
echo “$a is even”
else
echo “$a is odd”
[/sourcecode]
Output:
ODD OR EVEN NUMBER
Enter the value: 5
5 is odd
Enter the value: 8
8 is even
Another great beneficial and informative post as usual. Balaji you are working well to enhance our information.