Sed & Awk

Sed & Awk

KG - 1st Grade

10 Qs

quiz-placeholder

Similar activities

CODE ZENITH

CODE ZENITH

University

15 Qs

Tin học 10 _ Bài 16 _Định dạng văn bản

Tin học 10 _ Bài 16 _Định dạng văn bản

10th - 12th Grade

10 Qs

Ulangan harian 1 Algoritma dan Pemrograman

Ulangan harian 1 Algoritma dan Pemrograman

12th Grade - University

13 Qs

Computer Education 7

Computer Education 7

7th Grade

11 Qs

Challenge 3 Fourth grade

Challenge 3 Fourth grade

4th Grade

11 Qs

loop while/do while

loop while/do while

7th - 12th Grade

10 Qs

TIK (3)

TIK (3)

3rd Grade

10 Qs

ESBrotherX_Medical AI_Lecture

ESBrotherX_Medical AI_Lecture

University

7 Qs

Sed & Awk

Sed & Awk

Assessment

Quiz

Computers

KG - 1st Grade

Practice Problem

Hard

Used 18+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Without the -n option, what will the following sed command print to the terminal? | sed '/line/' readme.txt

All lines that include 'line'

All lines and the lines including "line" (some duplicates)

Will print the line numbers

All of the lines in the file

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following command print? | sed -n '4,20 p' readme.txt

All lines and lines 4-20 (duplicates)

Only lines 4-20

Only line 4 and 20

Lines 5-19

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will the following command do? | sed 's/hello/goodbye/' readme

Find the first instance of hello in each line and replace it with goodbye

Add hello after every goodbye in the file

Search for "hello" and "goodbye" and print to screen

Replace all instances of "hello" with "goodbye"

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will the following command do? | sed 's/hello/goodbye/g' readme

Substitute all instances of "hello" with "goodbye" and print to screen

Find the first instance of "hello" in each line and replace it with "goodbye" and print to screen

Substitute all instances of "hello" and replace it with "goodbye" but write the changes to the file

Shut down the computer and print Hello Goodbye

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What option for sed will write changes to the file?

-c

-n

-i or --in-place

-l

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following awk command do with no pattern?

awk '{ print }' readme.txt

Print all lines

Delete all lines

Print the first line

Will not do anything

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following awk command do with no action?

awk '/chevy/' cars

Print lines including "chevy"

Print all lines

Will not print anything

Error: you need an action

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?