Delete lines containing pattern at the end of line

Viewed 13845

Quite certainly I miss something basic. My file contains lines like

fooLOCATION=sdfmsvdnv

fooLOCATION=

barLOCATION=sadssf

barLOCATION=

and I want to delete all lines ending with LOCATION=.

sed -i '/LOCATION=$/d' file

does not do, it deletes nothing, and I have tried endless variations, but I don't get it. What inline sed command can do this?

3 Answers
Related