Basic Bash Linux Text

Basic Bash Linux Text

10th - 12th Grade

34 Qs

quiz-placeholder

Similar activities

Próbny EE.09

Próbny EE.09

10th Grade

29 Qs

dasar desain grafis

dasar desain grafis

10th Grade

33 Qs

Mid Tes HTML Quiz

Mid Tes HTML Quiz

11th Grade

35 Qs

ULANGAN HARIAN INFORMATIKA 1 KELAS VII

ULANGAN HARIAN INFORMATIKA 1 KELAS VII

9th - 12th Grade

30 Qs

SQL & JDBC Test

SQL & JDBC Test

10th Grade

39 Qs

Chủ đề Fict(bài 9,10,11)

Chủ đề Fict(bài 9,10,11)

12th Grade

35 Qs

Computer Pretest(Arduino)

Computer Pretest(Arduino)

12th Grade

33 Qs

1.1.1. Structure and function of the processor

1.1.1. Structure and function of the processor

12th Grade

34 Qs

Basic Bash Linux Text

Basic Bash Linux Text

Assessment

Quiz

Computers

10th - 12th Grade

Medium

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

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

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A file begins with #!/bin/sh. This means:

C Shell compatibility mode is enabled

Running the script will invoke /bin/sh to interpret the rest of the file

This is a Perl script

Nothing, this is a comment

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does this shell script do?

Nothing, since there is a problem with the conditions in the if statement

Creates /tmp/foo if it does not exist

Outputs a message to the screen

Creates /tmp/foo and raises an error if there is a problem

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following are correct about for and while loops?

Choose Two

for loops require a variable over which to iterate

while loops have a test each cycle to determine if it should run again

while loops operate over a fixed list of items

for loops operate over a fixed list of items

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Given the following part of a script:

What is the meaning of $1?

t is a special variable that indicates the exit code of the command before it

It is the first argument passed to the script

It is a file called $1

It is a list of files that gets interpolated

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Given the following script that is run through ./test.sh hello goodbye:

When will “I am here” be printed?

If a file called "goodbye" exists in the current directory

If a file called "hello" exists in the current directory

The script will always print “I am here”

Never

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the correct way to assign the word "Hello" to a variable?

$A="Hello"

A = "Hello"

A="Hello"

echo $A "Hello"

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the correct way to save the current directory to a variable?

A=$(pwd)

A=pwd

pwd $A

pwd | $A

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?