I want to replace kAbcdedf
with abcdef
in a file. I try to use the sed command. Some suggestions said, if I input this command
echo 'abc'|sed 's/^../\u&/'
the result will be
Abc
but on macOS (using zsh), the result is
uabc
Does anyone know the correct way to toggle cases with the sed command?
How can I search kAbcd
and then replace that string with abcd
, i.e., remove k
and uppercase the next letter after k
?