
BSIT3201-Finals

Quiz
•
Information Technology (IT)
•
University
•
Hard
Ardi Moran
Used 2+ times
FREE Resource
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?
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?
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?
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?
bashx=5
y=10echo $((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?
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:
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
Create a free account and access millions of resources
Similar Resources on Wayground
45 questions
Chapter 1 to Chapter 5 python

Quiz
•
University
46 questions
Software Engineering 2 Exam - Prelim

Quiz
•
University
51 questions
Final Exam Review: Information Management

Quiz
•
University
48 questions
Securitatea Cibernetică

Quiz
•
12th Grade - University
45 questions
Quiz Pra Asas 24 - Ganjil

Quiz
•
7th Grade - University
50 questions
Quiz Analisis dan Perancangan SI

Quiz
•
University
50 questions
PRELIM EXAMINATION ON LIVING IN THE IT ERA

Quiz
•
University
53 questions
Evaluación 1 - Fundamentos de Ingeniería de Software 5SC 25-1

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University