extracting line number
i have a string in a variable. with that string i have to grep the line containg that string in other file and i have to find the line number of that particular line.
i have found that particular line but have no idea to get the line number.
plz help me.