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 program to check the year is the leap year or not July 29, 2023 Shell script that accepts a filename, starting and ending line numbers as arguments and displays all the lines between the given line numbers September 15, 2023 A menu driven shell script for Copy a file, Remove a file, Move a file 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 a filename, starting and ending line numbers as arguments and displays all the lines between the given line numbers September 15, 2023