Exam 10: Shell Scripting
Exam 1: Introduction25 Questions
Exam 2: System Administration25 Questions
Exam 3: System Administration 225 Questions
Exam 4: Basic Information Security Model25 Questions
Exam 5: Asset Identification and Characterization25 Questions
Exam 6: Threats and Vulnerabilities25 Questions
Exam 7: Encryption Controls24 Questions
Exam 8: Identity and Access Management25 Questions
Exam 9: Hardware and Software Controls25 Questions
Exam 10: Shell Scripting25 Questions
Exam 11: Incident Handling25 Questions
Exam 12: Incident Analysis25 Questions
Exam 13: Policies, Standards and Guidelines25 Questions
Exam 14: It Risk Analysis and Risk Management25 Questions
Select questions type
The pipe operator, which directs the output from one command to another, is
Free
(Multiple Choice)
4.8/5
(31)
Correct Answer:
C
Consider the following script. The output will be:
#! /bin/bash
guess = 2
start = 3
check = $ $start )
if [ $guess -eq $check]
then
echo "Correct Guess: The number is $start"
else
echo "Sorry, wrong guess"
Free
(Multiple Choice)
4.7/5
(36)
Correct Answer:
A
Consider the following script. The output will be newlines replaced by spaces):#! /bin/bash
for number in
do
echo snumber
done
(Multiple Choice)
4.8/5
(51)
File users.csv contains lines as: Christine:Riggs:christine.riggs@sunshine.edu. The command to extract emails from the file is
(Multiple Choice)
4.9/5
(43)
Consider the following script. The output will be newlines replaced by spaces): #! / bin/bash
for number in
do
echo $number
done
(Multiple Choice)
4.7/5
(38)
A specific set of commands is to be executed 10 times. The most appropriate loop construct to accomplish this is
(Multiple Choice)
4.9/5
(29)
A user needs the following permissions to be able to use a script as a command
(Multiple Choice)
4.9/5
(30)
The command that will create a new variable in a bash script is
(Multiple Choice)
4.9/5
(29)
Consider the following script. The output will be newlines replaced by spaces for brevity): #! /bin/bash
counter=1
while [ \$counter -le 5]
do
echo $counter
counter=$counter )
done
(Multiple Choice)
4.7/5
(31)
An infinite loop a loop that runs forever can sometimes be useful
(True/False)
4.9/5
(36)
Consider the following script. The output will be newlines replaced by spaces for brevity): #! /bin/bash
counter=1
while [ $counter -le 2]
do
echo $counter
done
(Multiple Choice)
4.9/5
(33)
Consider the following script. The output will be: #! /bin/bash
guess=2
check=$ $RANDOM )
if [ $guess -eq $check]
then
echo "Correct Guess: The number is $check"
else echo "Sorry, wrong guess"
(Multiple Choice)
4.8/5
(34)
The first line of an executable script needs to be #!/bin/bash, in order to
(Multiple Choice)
4.9/5
(37)
A specific set of commands is to be executed until a pre-specified condition is reached. The most appropriate loop construct to accomplish this is
(Multiple Choice)
4.8/5
(20)
Showing 1 - 20 of 25
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)