Linux String Substitute (sed) HELP URGENT

Not sure what is wrong but giving the same error …pls help. Screenshot below.

Hi @kachaveswapnil3 ,
Can you please share your task under the “Review” and share that link here?

Regards,

This command sed -e 's/the/them/g' BSD.txt > BSD_REPLACE.txt is not correct.You don’t require to alter those words which are containing this the word.
In your case, it’s and.
You can check with the grep command.

cat BSD.txt | grep and
cat BSD_REPLACE.txt | grep and

In the below screenshot, you can see that the last line, it’s neither but after running the command you gave it’s replaced by them - neithemr which is completely wrong. It should only replace the word the with them only.