
Mastering the sed Command in Linux
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Leyla Zeynallı-Hüseynzadə
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the basic syntax of the sed command?
sed [options] 'input-file' 'script'
sed [options] 'script' [input-file]
sed [input-file] 'script'
sed 'script' [input-file] [options]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you perform substitution in a string using sed?
sed 's/pattern/replacement/' filename
sed 's/pattern/replacement/g' filename
sed 'r pattern/replacement/' filename
sed 's/replacement/pattern/' filename
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which sed command is used to delete a specific line from a file?
sed -i 'Nd' filename
sed -n 'Nd' filename
sed 'N!d' filename
sed -e 'Nd' filename
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you insert text before a specific line using sed?
sed '3s/^/text to insert /' filename
sed '3c ext to insert' filename
sed '3i\text to insert' filename
sed '3a ext to insert' filename
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 's' command in sed?
The 's' command formats output for display.
The 's' command is for searching text.
The 's' command is used for deleting lines.
The 's' command in sed is for substitution.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you use sed to delete all blank lines in a file?
sed -e '/^$/d' filename
sed -n '/./p' filename
sed -i '/^$/d' filename
sed -i '/^/d' filename
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the command to replace 'foo' with 'bar' in a file using sed?
sed 's/foo/bar/' filename
sed -i 's/foo/bar/g' filename
sed -i 's/bar/foo/g' filename
sed -e 's/foo/bar/g' filename
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
18 questions
The Rise of Intelligent Machines
Quiz
•
8th Grade - University
15 questions
quiz Pertama XII
Quiz
•
9th - 12th Grade
10 questions
ICT as Platform for Change
Quiz
•
11th - 12th Grade
10 questions
emtech
Quiz
•
12th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
