You are Here: Home > Computer Subjects > Unix Shell Programming…
Match String by taking User Input
Code:
clear echo -n "Please Enter a String==> " read str if test $str = Unix then echo "Matched!!!" else echo "Not Matched!!!" fi
Output:
Please Enter a String==> Program
Not Matched!!!
—————————————————————–
Please Enter a String==> Unix
Matched!!!
Click Here to Find Latest Jobs and Current Affairs