Bash Scripting introduction

Bash Scripting introduction

Professional Development

23 Qs

quiz-placeholder

Similar activities

js DOM

js DOM

12th Grade - Professional Development

20 Qs

Nuevas tecnologías

Nuevas tecnologías

6th Grade - Professional Development

20 Qs

Tout savoir sur Windows Quiz 2

Tout savoir sur Windows Quiz 2

Professional Development

20 Qs

Basis Data Kelas XII

Basis Data Kelas XII

Professional Development

19 Qs

STIN (EM24) - Cadena de valor (T8)

STIN (EM24) - Cadena de valor (T8)

University - Professional Development

20 Qs

Sharing Knowledge Hughes Network System

Sharing Knowledge Hughes Network System

University - Professional Development

20 Qs

Office 365 & Services

Office 365 & Services

Professional Development

20 Qs

Bash Scripting introduction

Bash Scripting introduction

Assessment

Quiz

Computers

Professional Development

Practice Problem

Medium

Created by

Jose Peiron

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of $#?

Shows the Process ID of the current script.

Shows the count of the arguments passed to the script.

Shows the end status of the last process to execute.

Returns the current line number of the script.

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If funny.sh is in your current directory, how do you run it?

None of the alternatives

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of $?

It gives more details about the ? command

It shows Variable $

It gives the exit status of the last command that was executed.

It is used with echo to show the current status of the echo command

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of this line "#! /bin/bash"

Is used on top of a script file to determine the output of the script

Instructs the user not to use /bin/bash

Determines the location of the engine which is to be used to execute the script

Its used to make the script look prettier

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command shows if /usr/bin is in the current shell search path?

cat PATH

echo $PATH

echo %PATH

cat $PATH

echo %PATH%

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is it possible to determine if an executable file is a shell script which is read by Bash?

The r bit is set.

The file must end with .sh.

The first line starts with #!/bin/bash.

/bin/bash has to be run in debug mode.

Scripts are never executable files.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements may be used to access the second command line argument to a script?

"$ARG2"

$1

"$2"

"$1"

'$2'

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?