Shell script to wish according to day time
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 ]…
q
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…
Assume the problem was decidable. Then there must be a total Turing machine Ma deciding it. We shall use Ma to build a new total Turing machine M∈ deciding the…
Solution: There are exactly 2 trivial properties: the empty set (of r.e. sets) and the set of all r.e. sets. Since we represent every r.e. set by some (encoding of…
NFA for (a+b)*abbε – closure (0) = {0,1,2,4,7} —- Let AMove(A,a) = {3,8}ε – closure (Move(A,a)) = {1,2,3,4,6,7,8}—- Let B Move(A,b) = {5}ε – closure (Move(A,b)) = {1,2,4,5,6,7}—- Let C Move(B,a)…
We compile a regular expression into a recognizer by constructing a generalized transition diagram called a finite automataA finite Automata or finite state machine is a 5-tuple(S,∑,S0,F,δ) where S is…