LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   what does =~ means in if test statement. (https://www.linuxquestions.org/questions/programming-9/what-does-%3D%7E-means-in-if-test-statement-879569/)

saini_mw 05-09-2011 12:08 AM

what does =~ means in if test statement.
 
Hello Guys,

I am trying to modify a shell script according to my requirements & i am seeing an if statement like below:

if [[ "$i" =~ "you are guest " ]] ; then
echo "Welcome Guest"

Now, can someone please tell me what does that =~ test condition means???

It isn't causing any problems to me in modifying the script but just curious to know what it is exactly..

Thx in advance.

grail 05-09-2011 12:33 AM

This should help.

saini_mw 05-09-2011 12:44 AM

thx man!!

MTK358 05-09-2011 01:15 PM

Mark the thread as solved.


All times are GMT -5. The time now is 06:49 PM.