
Mastering the sed Command in Linux

Quiz
•
Computers
•
12th Grade
•
Medium
Leyla Zeynallı-Hüseynzadə
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Managing Data Year 12

Quiz
•
11th - 12th Grade
10 questions
MOAC Word 2016 Lesson 1

Quiz
•
8th Grade - University
20 questions
EmTech: LONG QUIZ for Lesson 3 & 4

Quiz
•
11th - 12th Grade
10 questions
Cyber Security Quiz 1

Quiz
•
12th Grade
20 questions
ASK T1 (Bab 1 - Konsep Asas Pemikiran Komputasional)

Quiz
•
KG - University
10 questions
Basics of PowerPoint

Quiz
•
9th - 12th Grade
19 questions
Excel Vocabulary Review

Quiz
•
9th - 12th Grade
20 questions
TIK 9 - Penggunaan Browser Untuk Akses Internet

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade