Introduces how to replace single quotes within single quotes using sed in Linux command line or Bash.
$ echo \'aaaa\' | sed 's/'\''/1/g'
1aaaa1
I don’t quite understand the logic, but if you want to replace single quotes, don’t use ’ or similar,
use '''.
To make it clearer by replacing with a string, it’s [single quote][backslash][single quote][single quote].
You might think you could avoid this hassle by enclosing with double quotes instead of single quotes, but that causes other problems, so it’s better not to.