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;
>
»
<
>
The ________ command is another filter that is used to print the selected output of a file onto the screen.
cp
ls -l
ls
cut
cut
lab 7-5
Which of the following standard input value is used for the default keyboard?
1
3
2
0
4
0
The _______ command is another filter that converts tabs to spaces, without affection the source file. By default, a tab consists of eight spaces.
expand
ls -l
cp
cut
ls
expand
You can use ________ to convert the spaces back to default tabs in a file.
unexpand
cp
cut
expand
ls -l
unexpand
The _______ command is used to define the uniform spacing between words and sentences.
expand
cp
cut
fmt
unexpand
ls -l
fmt
Which two standard output values are used for the default terminal? [Choose two.]
3
4
0
1
2
1
2
To append the information to an existing file, which type of redirector should be used>
> > «<
> >
Which of the following is used for combining two outputs?
|
#
&
>
&
Which operator is typically used with the xargs command?
&
>
#
|
|