Shell append or insert

Is there a way to append or insert a word into a text file?

for example:

if a file contains the lines......

profilename="test_profile"
ear="${WpsInstallLocation}/installableApps/"
conntype="SOAP"

What I would like to have is the word test.ear inserted as below.....

profilename="wp_profile"
ear="${WpsInstallLocation}/installableApps/test.ear"
conntype="SOAP"

Is this possible?

What have you attempted so far and what you're having trouble with?

Regards

How about this, assuming you need to append stuff at 2nd line.

sed '2 s|"$|test.ear&|' < file.txt

I have tried using sed and awk but it�s not working as I am finding it difficult to single out the one line.

cool thanks!