I want to use sed to replace every
'} that comes at the end of the line to
"}. I wrote:
sed -i -e "s/'}$/\"}$/g"
But this replaces it to:
"}$. What is wrong? How can I use regex in my sed to express beginning and end of line using
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Only the search expression is a regex, the replacement text isn’t:
sed -i -e "s/'}$/\"}/g"
'} at the end of a line, and replaces it with