need help with finding a word in file's contents

Hi,
I need to check if a particular name is already in the file or not and i am using following code for this...

match=$(grep -n -e "$output1" outputfiles.txt )

where output1 is the variable name having names in it and outputfiles.txt is the file name ..and i am using ksh
can anybosy help me with this...
Thanks

And how is this not working? What is the error message? If no error, what results are you getting? Give sample input and expected output. Have you checked the value of $output1 to make sure it has what you are looking for?

Hi, this code is working but it is adding some number as prefix with names. here is the result when i tried to echo $match and $output1
match is 3:'orgn_unt_ip_interface'-08_10_01
file is 'orgn_unt_ip_interface'-08_10_01
so in here output1 is 'orgn_unt_ip_interface'-08_10_01

but match is
3:'orgn_unt_ip_interface'-08_10_01

it is adding 3: with this name,
similarly with other names but with different numbers like
match is 9:'indv_depnd_ip_interface'-08_10_01
file is 'indv_depnd_ip_interface'-08_10_01

and also i need that if there is match in the file it should display only one name but it is showing number of same names but with different digits. it is because that name appears more than once in the file.

match is 11:'segm_memb_interface'-08_10_01
16:'segm_memb_interface'-08_10_01
file is 'segm_memb_interface'-08_10_01

or is there any way if i can suppress digits and colon and only get names

and also one thing more, i just cat outputfiles.txt and found that basically those digits represent corresponding position for the names. here is list of names in outputfiles.txt
hykki
'segm_interface'-08_10_01
'orgn_unt_ip_interface'-08_10_01
'orgn_unt_ip_interface'-08_10_01
'com_cust_cntc_interface'-08_10_01
'cust_aset_liab_ip_interface'-08_10_01
'cust_cont_pref_interface'-08_10_01
'cust_ip_interface'-08_10_01
'indv_depnd_ip_interface'-08_10_01
'indv_occup_ip_interface'-08_10_01
'segm_memb_interface'-08_10_01
'orgn_unt_ip_interface'-08_10_01
'indv_occup_ip_interface'-08_10_01
'cust_aset_liab_ip_interface'-08_10_01
'cust_ip_interface'-08_10_01
'segm_memb_interface'-08_10_01
'segm_interface'-08_10_01
'employee_interface'-08_10_01
'segm_memb_interface'-08_10_01
'indv_depnd_ip_interface'-08_10_01

Yes, don't use "-n". Do a man on grep.

Thanks i'll look at it