Linux Practicals

find whether the entered number is prime or not.

Script: – echo “Enter a number: ” read num i=2 f=0 while [ $i -le `expr $num / 2` ] do if [ `expr $num % $i` -eq 0...

write a shell script for addition, subtraction, multiplication and division of two numbers

Script: – echo “Enter a:” read a eho “Enter b:” read b sum= `expr $a + $b` diff= `expr $a – $b` prod= `expr $a * $b` quo= `expr...

write a shell script for addition of three integer numbers.

Script: – echo “Enter a:” read a echo “Enter b:” read b echo “Enter c:” read c sum = ‘expr $a + $b’ echo “The sum is $sum” Output:...