CSE 15L Lab 8

Quiz
•
Computers
•
University
•
Hard
Genevieve Dietz
Used 56+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
How do you run a bash script named script.sh?
java script.sh
cd script.sh
bash script.sh
ba script.sh
2.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does set -e do?
all executed commands are printed to the terminal
exit if any command has a non-zero exit status
causes the program to immediately exit
the script can still run even if a command returns a non-zero exit status
3.
MULTIPLE SELECT QUESTION
45 sec • 2 pts
What is the right syntax for an if statement that checks if the path for val exists?
[[ -e <val> ]]
[ -e <val> ]
[[-e <val>]]
[-e <val>]
4.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which symbol reads the repository link you passed when executing grade.sh (first command line argument)?
$?
$$
$0
$1
5.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does $? do?
represents the list of arguments passed to the current process
prints to standard out
represents the exit status of the previous command
prints to standard error
6.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Where might it be useful to use or check an exit code?
in scripts that run known code or use known data
in scripts that run unknown code or use unknown data
it's never useful in bash scripts
after a print statement
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does cp -r source dest do?
copy directories recursively
removes files located in the dest directory
removes each existing destination file before attempting to open it
replaces dest with source
8.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What command can we use to redirect stderr to stdout and then both to file.txt?
cmd 2>1>>file.txt
cmd 2>file.txt
cmd >file.txt 2>&1
cmd >file.txt $2&1>
Similar Resources on Wayground
12 questions
Hacking Scenarios

Quiz
•
University
12 questions
Web Apps 02 - MeteorJS

Quiz
•
University
6 questions
LO2 SR

Quiz
•
University
10 questions
Quiz - Dizajni dhe Zhvillimi i Uebit

Quiz
•
University
10 questions
scratch quiz

Quiz
•
1st Grade - University
9 questions
Scratch Vocabulary

Quiz
•
3rd Grade - University
7 questions
PHP + MySql (1)

Quiz
•
University
10 questions
Cuestionario Kotlin Básico

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University