Sed & Awk

Sed & Awk

KG - 1st Grade

10 Qs

quiz-placeholder

Similar activities

Microsoft Excel

Microsoft Excel

5th Grade

12 Qs

Database Concepts

Database Concepts

11th - 12th Grade

15 Qs

KS4 - Representing Images

KS4 - Representing Images

9th - 11th Grade

15 Qs

conditional constructs in Java

conditional constructs in Java

10th Grade

10 Qs

Основные понятия языка программирования PYTHON

Основные понятия языка программирования PYTHON

7th Grade

12 Qs

Accessing the Internet

Accessing the Internet

9th - 10th Grade

15 Qs

Class VII Computer Quiz, By Amiya Kumar Pani

Class VII Computer Quiz, By Amiya Kumar Pani

7th Grade

15 Qs

9 сынып Python программалау тілінде алгоритмдерді программалау

9 сынып Python программалау тілінде алгоритмдерді программалау

1st Grade

10 Qs

Sed & Awk

Sed & Awk

Assessment

Quiz

Computers

KG - 1st Grade

Hard

Used 18+ times

FREE Resource

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

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?