using sed to add letter after variable

Hi All,

I need to have a sed command insert the letter i at the end of some lines in a file.

Problem is that where I want to add the i is after variables that change in each file

eg, tsal314384'
tsal315386'
tsal317392'

I need to have it like this

      tsal314384i'
      tsal315386i'
      tsal317392i'

so the problem is that the six numbers at the end of the line are never the same. Can anyone help ?

Jeremy

Try this. It places 'i' before the single quote at the end of your lines per your example

sed  "s/\'$/i'/g" file

hi fpmurpy

Thanks for getting onto it so quick.

This has worked to some extent but now I have this problem

tsal314384'i' instead of tsal314384i'

Do you know what is happening here.

Jeremy