Module 7 Live Virtual Machine Labs 1-8 Flashcards
You need to make the shell script executable. Which of the parameter along with the chmod command should you use?
+x
-x
+rwx
-rwx
+x
lab 7-1
The _______ statements are mainly used for making a decision and therefore, are known as decision-making statements.
until loop
for loop
while loop
if…else
case…esac
if…else
In a scenario, where you have multiple conditions, it is best to use ________ statements.
if…else
for loop
until loop
while loop
case…esac
case esac
Which two loops run until a statement becomes true? [Choose two.]
for loop
while loop
case…esac
until loop
if…else
while loop
until loop
The ______ loop runs through a list of values in a list until the time list values are exhausted.
for loop
if…else
until loop
while loop
case…esac
for loop
lab 7-2
Which variables are contained in /etc/profile? [Choose all that apply.]
USER
PATH
MAIL
HOSTNAME
HISTSIZE
USER
PATH
MAIL
HOSTNAME
HISTSIZE
The ____ profile is the user configuration file in which the user environment can be configured.
~/.bash_profile
~/.bash_login
/etc/profile
/etc/bashrc
~/.bash_profile
If the ~/.bash_profile does not exist, then the __________ file is read.
~/.profile
/etc/bashrc
/etc/profile
~/.bash_login
~/.bash_login
The _________ gets executed only during a login shell.
~/.bash_profile
~/.bash_login
/etc/profile
/etc/bashrc
~/.bash_profile
Which value with the chmod command will make a shell script executable?
100
400
700
444
700
lab 7-3
The default output of a command is displayed on the _______. [Choose all that apply.]
File
Keyboard
Screen
Console
console
screen
The output of a command is redirected to a new file with the help of the _____ operator.
> > <
«
>
Which operator will overwrite the contents of an existing file?
> «_space;
>
<
>
Which operator will append the output to the same file without overwriting it?
> > <
«
> >
lab 7-4
To send the content of one file to another file, you can use the _______ redirector.
«_space;
>
»
<
>