Basic Bash Linux Text

Basic Bash Linux Text

10th - 12th Grade

34 Qs

quiz-placeholder

Similar activities

HOJAS DE CÁLCULO SPS (2)

HOJAS DE CÁLCULO SPS (2)

11th Grade

36 Qs

LO1 iMedia

LO1 iMedia

7th - 10th Grade

31 Qs

Chapter 11 Review

Chapter 11 Review

7th - 12th Grade

30 Qs

ms access

ms access

11th Grade

33 Qs

Examen de Páginas Web 3°3 2025

Examen de Páginas Web 3°3 2025

12th Grade

30 Qs

Principles of IT-Chapter 5 Test

Principles of IT-Chapter 5 Test

7th - 12th Grade

30 Qs

GIỮA KỲ 2 -  TIN 8

GIỮA KỲ 2 - TIN 8

8th Grade - University

36 Qs

โปรแกรมนำเสนองาน

โปรแกรมนำเสนองาน

1st - 10th Grade

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

Discover more resources for Computers