LPI
101-500 · Question #205
101-500 Question #205: Real Exam Question with Answer & Explanation
Sign in or unlock 101-500 to reveal the answer and full explanation for question #205. The question stem and answer options stay visible for context.
GNU and Unix Commands
Question
Which of the following sed commands will replace all instances of the string foo with the string foobar changing the file filel.txt in place?
Options
- Ased 's/foo/foobar/g' file1.txt
- Bsed 's/foo/foobar/g' file1.txt > file1.txt
- Csed 's/foo/foobar/g' file1.txt | file1.txt
- Dsed -i 's/foo/foobar/g' file1.txt
- Esed -i 's/foo/foobar/g' file1.txt >file1.txt
Unlock 101-500 to see the answer
You've previewed enough free 101-500 questions. Unlock 101-500 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#sed in-place editing#text substitution#stream editor#file redirection