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 to reverse a given string September 16, 2023 Shell script that accepts path names and creates all the components in that path names as directories July 31, 2023 C program that creates a child process to read commands from the standard input July 31, 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