
BSIT3201-Finals
Authored by Ardi Moran
Information Technology (IT)
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best explains why using #!/bin/bash at the beginning of a script is important?
Which of the following best explains why using #!/bin/bash at the beginning of a script is important?
It makes the script executable.
It defines the location of the shell to execute the script.
It comments out the second and last line of the executable script
It sets the default permissions of the file in bash scriptng
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are writing a script to check disk space. Which command combination is most effective for storing and analyzing the used disk percentage?
You are writing a script to check disk space. Which command combination is most effective for storing and analyzing the used disk percentage?
ls | grep
df -h | awk '{print $5}'
du -h | head -1
ps aux | sort
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true regarding variables in shell scripting?
Which statement is true regarding variables in shell scripting?
All variables must be declared with var int.
Variables are declared with a dollar sign $ prefix.
Variable values are assigned using = without spaces.
All variables are automatically global.
Answer explanation
Shell variable syntax requires no space before or after the =.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following script output?
bash
x=5
y=10
echo $((x+y))
What will the following script output?
bash
x=5
y=10
echo $((x+y))
x+y
15
5+10
Error
Answer explanation
The $(( )) evaluates arithmetic expressions.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is chmod +x script.sh necessary before executing a script directly?
Why is chmod +x script.sh necessary before executing a script directly?
It changes the owner of the script.
It adds write permissions to the script.
It allows the script to be executed.
It creates a backup of the script.
Answer explanation
The +x flag gives execute permission.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A system admin wants to create a backup script that copies all .conf files from /etc to /backup and logs the time of backup.
Which of the following commands is most appropriate in the script?
cp /etc/*.conf /backup && date >> log.txt
mv /etc/*.conf /backup && time >> log.txt
cat /etc/*.conf > /backup && echo $date >> log.txt
ls /etc/*.conf | cp /backup && echo date >> log.txt
Answer explanation
This line copies .conf files and logs the date after a successful operation.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You wrote a script with this snippet:
You wrote a script with this snippet:
What would happen if the user entered a non-numeric input like "abc"?
The script prints "Low".
It compares text and prints "High".
It shows a syntax error.
It crashes with an error message.
Answer explanation
Non-numeric input will cause [ $num -gt 10 ] to fail, leading to an error
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
47 questions
BÀI 2: CÁC GIAO THỨC MẠNG
Quiz
•
10th Grade - University
45 questions
EER Model Concepts and Relationships
Quiz
•
University
55 questions
C++ Object-Oriented Programming Quiz
Quiz
•
University
50 questions
Disruptive Technology Quiz
Quiz
•
University
50 questions
LQ#2_IS101 (Fundamentals of Information Systems)
Quiz
•
University
50 questions
FHCI Quiz 02
Quiz
•
University
50 questions
Mobile Devices Quiz
Quiz
•
University
50 questions
Remidi PPLG
Quiz
•
12th Grade - University
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for Information Technology (IT)
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University