Shell script to check whether the given number is even or odd Post author:Educate Post published:September 15, 2023 Post category:Shell Script Post comments:0 Comments Program: if the number divided by 2 the such number is even otherwise odd clear echo "enter a number" read n if [ `expr $n % 2` -eq 0 ]; then echo " $n is even number" else echo "$n is odd number" fi You Might Also Like Shell script that accepts path names and creates all the components in that path names as directories July 31, 2023 Shell program to find and display largest and smallest of three numbers July 29, 2023 Shell program to check the year is the leap year or not July 29, 2023 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.
Shell script that accepts path names and creates all the components in that path names as directories July 31, 2023