I am trying to use sed to substitute a string taking into account an whitespace.
Example:
Hello World
to be replaced by
Hello George
I tried:
sed -e 's/Hello[:space]+World/Hello George/' ./infile > outFile
but it does not work.
How can I fix this?
[:space:]and not[:space], I think. Also,[[:space:]], otherwise the square brackets will be misinterpreted.