Write a command to replace the word “bad” with “good” in file?

sed s/bad/good/ < filename

Category: UNIX Interview Questions.