
Basic Bash Linux Text
Quiz
•
Computers
•
10th - 12th Grade
•
Medium
Used 5+ times
FREE Resource
Enhance your content in a minute
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
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
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
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
33 questions
Sumatif 1 - Bab Sistem Komputer
Quiz
•
10th Grade
30 questions
TIK dan Informatika Kelas 10 (UH-1)
Quiz
•
10th Grade
30 questions
Programming Techniques
Quiz
•
8th - 10th Grade
30 questions
SINAQ (ONLINE)
Quiz
•
11th Grade
36 questions
Excel tercel parcial licenciatura
Quiz
•
9th Grade - University
38 questions
he
Quiz
•
8th - 10th Grade
30 questions
SAS_Accurate_Fase F_XI AKL
Quiz
•
11th Grade
30 questions
Quiz Pemrograman web dan perangkat bergerak - XI
Quiz
•
11th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
