How can we match any whole word in the input text, then replace it with the replaceString. For example. I would like sed command to match any word in the input text and replace each of them with "XXX".
echo "bar embarrassment recommended" | sed "Please fill right answer here"
I would like output like this
XXX XXX XXX
I am new to Linux. So there may be some other command that can work best here in this situation.Any recommendation?
The definition of a word in this question is very simple. It can contain alphabets a-z or A-Z ,an underscore. And any two words are delimited by a white space.
Examples
this is a sample text
This Is A Sample Text
this_ is_ a_ sample_ text_