Match String by taking User Input > Unix Shell Programming - counter
Sponsored Links


Popular Links


List of Abbreviations

National Highways in India

States & Union Territories of India

Currency of All Countries

Match String by taking User Input > Unix Shell Programming

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

 

Updated: June 1, 2013 — 4:33 am
© 2016. All Rights Reserved. WikiIND.com