ITN 170 Chapter 7

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

You need to make the shell script executable. Which of the parameter along with the chmod command should you use? -x -rwx +rwx +x

+x

Which variables are contained in /etc/profile? (choose all that apply) PATH HISTSIZE HOSTNAME USER MAIL

ALL

The if decision construct will always end with the statement _________.

fi (if reversed)

You can use ________ to convert the spaces back to default tabs in a file. cut unexpand cp ls -l expand

unexpand

Which two loops run until a statement becomes true? (choose two) while loop for loop case....esac until loop if....else

while loop until loop

if the ~/.bash_profile does not exist, then the _____ file is read. ~/.bash_login ~/.bash_profile /etc/profile /etc/bashrc

~/.bash_login

The _____ profile is the user configuration file in which the user environment can be configured. ~/.bash_login ~/.bash_profile /etc/profile /etc/bashrc

~/.bash_profile

The ________- gets executed only during a login shell. ~/.bash_login ~/.bash_profile /etc/profile /etc/bashrc

~/.bash_profile

which value with the chmod command will make a shell script executable? 100 400 444 700

700

The output of a command is redirected to a new file with the help of the __________ operator. >> < << >

>

To send the content of one file to another file, you can use the _________ redirector. > << >> <

>

Which operator will overwrite the contents of an existing file? > < >> <<

>

Which operator will append the output to the same file without overwriting it? > < >> <<

>>

True or False? When using the output redirect > on an existing file, the contents of the file will be replaced.

True

When using two output redirects, >>, on an existing file, the file contents will be _____________. appended copied saved deleted

appended

In a scenario, where you have multiple conditions, it is best to use ____ statements. if....else case....esac until loop while loop

case....esac

The default output of a command is displayed on the ________. (choose all that apply) Keyboard Console File Screen

console screen

The _______ command is another filter that is used to print the selected output of a file onto the screen. ls -l cp cut ls

cut

The _________ command is another filer that converts tabs to spaces, without affection the source file. By default, a tab consists of eight spaces. cut ls ls -l expand cp

expand

The _______ command is used to define the uniform spacing between words and sentences. cp ls -l fmt cut expand unexpand

fmt

The _____ loop runs through a list of values in a list until the time list values are exhausted. case....esac while loop if....else for loop

for loop

The ______ statements are mainly used for making a decision and therefore, are known as decision-making statements. for loop until loop while loop if....else case....esac

if....else

We asked the user to enter a positive or negative number and used 4 as an example. Given what you know about the script, the number 5 would be classified as a ______ number. negative positive prime scope

positive

The | (pipe) metacharacter takes the stdout of a command and sends it to another command as ______.

stdin


Kaugnay na mga set ng pag-aaral

Prep U's - Chapter 28 - Drug Therapy for Coronary Artery Disease

View Set

Bio-Chapter 20-Viruses, Bacteria, and Archaea

View Set

Chapter 34: Comfort and Pain Management

View Set

Modales - Preguntas y Respuestas

View Set