
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
29 questions
BLENDER INTRO_2
Quiz
•
9th - 12th Grade
35 questions
ÔN TẬP GKII TIN 11
Quiz
•
11th Grade
32 questions
Year 9 Digital Media and Sound Assessment
Quiz
•
10th Grade
35 questions
Информатика
Quiz
•
9th - 11th Grade
29 questions
Exam Revision 3
Quiz
•
12th Grade
30 questions
Banana Tales - Mid Test 01/2021
Quiz
•
9th - 11th Grade
30 questions
Tin 10_ ôn tập giữa kì 2
Quiz
•
10th Grade
29 questions
Algorithms, ICT careers, hardware
Quiz
•
8th - 10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
