Quiz 7

¡Supera tus tareas y exámenes ahora con Quizwiz!

What is the output of this code segment? Unix=('Debian' 'Red hat' 'CentOS' 'Suse' 'Fedora') echo ${ Unix[@]:2:2 }

CentOS Suse

What is the output of this code segment? Unix=('Debian' 'Red hat' 'Ubuntu' 'Suse' 'Fedora' 'UTS' 'OpenLinux') pos=3 Unix=(${Unix[@]:0:$pos} ${Unix[@]:pos + 1))}) echo ${Unix[@]}

Debian Red hat Ubuntu Fedora UTS OpenLinux

What is the output of this code segment? Unix=('Debian' 'Red hat' 'Ubuntu' 'Suse' 'Fedora' 'UTS' 'OpenLinux') Linux=("${Unix[@]}") echo ${Linux[@]}

Debian Red hat Ubuntu Suse Fedora UTS OpenLinux

Give this datafile that contains: USA Canada Britain China What will this code segment display? #!/bin/bash country=( `cat datafile` ) for t in "${ country[@] } " do echo $t done

USA Canada Britain China

What is the output of this program? #!/bin/bash var[1]=san_1 var[2]=san_2 var[3]=san_3 echo ${var[@]} exit 0

san_1 san_2 san_3

What is the output of this code segment? Unix=('Debian' 'Red hat' 'CentOS' 'Suse' 'Fedora') echo ${ #Unix[@] }

5

What is the output of this code segment? Unix=('Debian' 'Red hat' 'Ubuntu' 'Suse' 'Fedora' 'UTS' 'OpenLinux') Unix=("${Unix[@]}" "AIX" "HP-UX") echo ${Unix[7]}

AIX

What is the output this code segment? Unix=('Debian' 'Red hat' 'Ubuntu' 'Suse' 'Fedora' 'UTS' 'OpenLinux') unset Unix echo ${ Unix[@] }

Nothing

What is the output of this code segment? Unix=('Debian' 'Red hat' 'CentOS' 'Suse' 'Fedora'); Unix= echo ${ Unix[@] }

Red hat CentOS Suse Fedora

What is the output of this code segment? Unix=('Debian' 'Red hat' 'CentOS' 'Suse' 'Fedora') echo ${Unix[3]}

Suse


Conjuntos de estudio relacionados

Course 5 Module 7. Distribution Rules, Alternatives and Taxation

View Set

Operating Systems: Three Easy Pieces

View Set

Combo with "Respiratory System questions" and 6 others

View Set

Honors Chemistry Everett Study Guide Final Exam

View Set

Ch. 1 Homeostasis and Organelles

View Set

Adolescent Development Chapters 6-7

View Set