Menu driven shell script to demonstrate the use of tail , cmp, uniq and rm commands
clear opt=y while [ $opt = y ] do clear echo "----------Menu driven program --------" echo echo echo "1. Usage of tail command " echo echo "2. Usage of cmp…
clear opt=y while [ $opt = y ] do clear echo "----------Menu driven program --------" echo echo echo "1. Usage of tail command " echo echo "2. Usage of cmp…
clear echo "enter the file name" read fname1 echo "enter the contents of $fname1 and press ctrl+d" cat >$fname1 echo "enter the file name 2" read fname2 echo "enter the…
clear echo "enter the file name" read fname echo "size of $file name before compression is" wc -c $fname gzip $fname echo "size of file name after compression" wc -c…
clear hours=`date|cut -c12-13` if [ $hours -le 12 ] then echo "Good Morning" else if [ $hours -le 16 ] then echo "Good Afternoon" elif [ $hours -le 20 ]…
clear echo "enter the string" read str len=`expr $str | wc -c` len=`expr $len - 1` while [ $len -gt 0 ] do ch=`echo $str | cut -c $len` echo…
clear sum=0 i="y" echo " Enter one no." read n1 echo "Enter second no." read n2 while [ $i = "y" ] do echo "1.Addition" echo "2.Subtraction" echo "3.Multiplication" echo…
clear echo "Enter two intergers" read m n echo " To find GCD and LCM" echo "====================" echo "given two numbers are" echo "m= $m and n=$n" temp=`expr $m *…
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 ];…
Concept:Cat: cat command is used to create the fileSyntax: cat > file name for creationSyntax: cat file name for displaying a fileSed: sed means stream editor it can be used for editing…