Odd or Even Using Shell Programming

  • Post author:
  • Post category:Linux
  • Post comments:1 Comment
  • Reading time:1 mins read

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

Balaji

, is a computer science graduate. He is interested in sharing the system tweaking ,Web-designing, SEO and tips to use your system fetching you utmost use. Happy tweaking! :D

This Post Has One Comment

  1. [email protected] ideas

    Another great beneficial and informative post as usual. Balaji you are working well to enhance our information.

Leave a Reply