Sed & Awk

Sed & Awk

KG - 1st Grade

10 Qs

quiz-placeholder

Similar activities

Streams

Streams

Professional Development

10 Qs

Word 2016 Basics - Saving Document, Page Layout, Header & Foot

Word 2016 Basics - Saving Document, Page Layout, Header & Foot

7th Grade

10 Qs

Computational Thinking in Python[Quiz 3]

Computational Thinking in Python[Quiz 3]

University

15 Qs

Grade 2 komputer term 2

Grade 2 komputer term 2

2nd Grade

10 Qs

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)

University

10 Qs

ICT Unit Test Topic : DBMS - Access

ICT Unit Test Topic : DBMS - Access

8th - 12th Grade

15 Qs

Arduino

Arduino

7th - 9th Grade

15 Qs

VPN

VPN

1st - 5th Grade

10 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?