pattern match in a string

Hello,

Please see below line code:

 
#!/bin/ksh
set -x
/usr/bin/cat /home/temp |while read line
do
if [[ "$line" == "start time" ]]
then
    echo "matched"
else
    echo "nope"
fi
done

content of filr temp is as below

[EMAIL="temp@bak"]

 
temp@bak# cat temp
start time: "3:33"
temp@bak#

[/EMAIL]

I want to match string "start line" but it's not giving correct output as matched.

Thanks !!

awk '{if (/start time/) {print "matched"} else {print "nope"}}' filename

actually there are n number of lines int he file so some have that string and some doesnt have it .... I need to find out lines based on pattern match and based on that have to do another string operation which macth the pattern ...

Hence its like

 
 
if ( check if pattern present)
 
    if yes do this
 
else 
 
   if not d that
 
fi

need in this only ...

Maybe something like this?

#!/bin/bash
while read line
do
echo $line |grep "start" > /dev/null 2>&1
if [ "$?" == "0" ]
    then
        echo "Matched"
    else
        echo "nope"
fi
done < temp
jaysunn@jaysunn-linux:~$ ./script.sh 
Matched
nope
nope
Matched
nope
nope
Matched
if [[ "$line" == *"start time"* ]]