Question: Question 1 ( 7 . 6 points ) Listen Review the BASH code and selec t the best answer to call the value of hobby?

Question 1(7.6 points)
Listen
Review the BASH code and selec t the best answer to call the value of hobby?
hobby="swimming"
Question 1 options:
echo $Hobby
echo "hobby"
echo $swimming
echo $hobby
Question 2(8 points)
Listen
What does the following command do in BASH? ps -u rtest | more
Question 2 options:
Prints out the the results of the ps command for the user rtest one screen at a time.
Writes a file called rtestMore.
Prints out the the results of the ps command for the user rtest and includes all processes from all users.
Prints out more details for the user rtest from the ps command.
Question 3(8 points)
Listen
What is the difference between echo ${myArray[@]} and echo ${myArray[*]} in your BASH script?
Question 3 options:
For Loop Example with '*', will echo individually each values
For Loop Exampe with '@', will echo only once all the values
For Loop Example with '@', will echo individually each values
For Loop Example with '@' or '*' will echo individually each values
Question 4(7.6 points)
Listen
What command in BASH should you use to find additional information for the command ls?
Question 4 options:
help ls
man ls
help man ls
ls is not a valid command in BASH..
Question 5(7.6 points)
Listen
What command do you type in BASH on a Linux system to retrive all basic system information?
Question 5 options:
uname -all
uname
systemInfo
uname -a
Question 6(7.6 points)
Listen
What command do you need to type in BASH to remove the value of the variable $mypet. You just typed mypet=fish.
Question 6 options:
unset $mypet
unset $fish
unset mypet
unset fish
Question 7(7.6 points)
Listen
Which BASH command will print out all entires to the screen within the array superUsers ?
Question 7 options:
echo ${superUsers[0-3]}
echo ${superUsers[@]}
echo ${superUsers["admin1", "admin2", "admin3"]}
All of the answers are correct.
Question 8(7.6 points)
Listen
What command should you type to define a comment in your code when writing a BASH script?
Question 8 options:
!
#
%
$
Question 9(7.6 points)
Listen
What is the correct syntax to retrive the first key of an array called exploits in BASH?
Question 9 options:
echo explots[1]
echo ${explots[0]}
echo explots(1)
echo $(explots(1))
Question 10(7.6 points)
Listen
How do you retrive the Bash Array size? (Array length)
Question 10 options:
echo "myArray contain ${#myArray[""]} elements"
echo "myArray contain ${#myArray[?]} elements"
echo "myArray contain ${#myArray[*]} elements"
echo "myArray contain ${#myArray(*)] elements"
Question 11(7.6 points)
Listen
What command should you type to view the recent commands you typed in terminal on a Linux OS?
Question 11 options:
last
history
man history
All of the answers are correct.
Question 12(8 points)
Listen
What BASH command will generate an array called superUsers in BASH?
Question 12 options:
superUser=("admin1", "admin2", "admin3")
superUser=["admin1", "admin2", "admin3"]
superUser=[("admin1", "admin2", "admin3")]
None of the answers listed are correct.
Question 13(7.6 points)
Listen
What command should you use to search for the process ID of the application Firefox in BASH?
Question 13 options:
ps -u `whoami` grep firefox
ps `user` grep firefox
ps -u `whoami`| grep firefox
ps -u `whoami`| grep "firefox"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!