Go back to LX0-101 - CompTIA Linux+ [Powered by LPI] Exam 1

Question :-

Which of the following sed commands will replace all instances of the string foo with the string foobar changing the file file1.txt in place?
sed 's/foo/foobar/g' file1.txt
sed 's/foo/foobar/g' file1.txt > file1.txt
sed 's/foo/foobar/g' file1.txt | file1.txt
sed -i 's/foo/foobar/g' file1.txt
sed -i 's/foo/foobar/g' file1.txt > file1.txt

Want to practice for LX0-101 - CompTIA Linux+ [Powered by LPI] Exam 1 ? Click here.