Which command is used to replace word ‘cat’ (already present in the file) with ‘mouse’ at all places in a file ‘old.txt’ and save the result in a new file ‘new.txt’?

🎲 Try a Random Question  |  Total Questions in Quiz: 19  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Linux Basics Practice Test: VI Editor & sed Editor — practice the complete quiz, review flashcards, or try a random question.

The sed command is a text stream editor in Linux that can perform many functions on files, including searching, finding and replacing, inserting, deleting, and matching regular expressions. The sed command can be used to edit files without opening them. The syntax for the sed command is sed OPTIONS... (SCRIPT) (INPUTFILE...).  Vi is a text editor that has the inline editor version of sed called sed. Here are some examples of using sed: sed 'p' BSD: Prints each line of the BSD file twice sed -n 'p' BSD: Suppresses automatic printing sed -n '1p' BSD: Prints the first line of the file sed... Show more

Which command is used to replace word ‘cat’ (already present in the file) with ‘mouse’ at all places in a file ‘old.txt’ and save the result in a new file ‘new.txt’?