-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2014-09-30_quiz.tex
242 lines (124 loc) · 3.57 KB
/
2014-09-30_quiz.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
\documentclass{beamer}
\DeclareMathOperator*{\argmax}{arg\,max}
\usepackage{beamerthemesplit}
\usepackage{tikz}
\usetikzlibrary{backgrounds,fit,shapes.misc}
\usepackage{enumitem}
% Set up citation style
\usepackage{natbib}
\usepackage{bibentry}
\bibpunct{(}{)}{;}{a}{,}{,}
\newcommand{\newcite}[1]{\citet{#1}}
\renewcommand{\cite}[1]{\citep{#1}}
\setbeamercovered{transparent}
\title[LING 402]{Tools and Techniques for \\ Speech and Language Processing}
\author[Tuesday, 30 September 2014]{Lane Schwartz}
\institute[shortinst]{University of Illinois at Urbana-Champaign}
\date{30 Sept 2014}
\begin{document}
% Specify that no bibliography should be printed
\bibliographystyle{plainnat}
\frame{\titlepage}
\section{Chapter 2}
\frame {
Which command prints the name of the current working directory?
\begin{enumerate}[label=\Alph*)]
\item awk
\item dir
\item here
\item man
\item pwd
\end{enumerate}
}
\begin{frame}[fragile]
What does the following command do?
\begin{verbatim}
$ ls /
\end{verbatim}
\begin{enumerate}[label=\Alph*)]
\item Changes the current working directory to the user's home directory
\item Creates a new directory
\item List the contents of the root directory
\item Prints today's date using / as the separator
\end{enumerate}
\end{frame}
\begin{frame}[fragile]
Which of the following is a relative path that refers to the current working directory?
\begin{enumerate}[label=\Alph*)]
\item -
\item /
\item .
\item ..
\item *
\end{enumerate}
\end{frame}
\section{Chapter 4}
\begin{frame}[fragile]
Which of the following commands will delete all files with the suffix .html from the current directory, and only those files?
\begin{enumerate}[label=\Alph*)]
\item ls -l *.html
\item file * .html
\item rm * .html
\item rm *.html
\item touch *.html
\end{enumerate}
\end{frame}
\begin{frame}[fragile]
After running the following command, where will the copied file be located?
\begin{verbatim}
$ cp /usr/include/printf.h ..
\end{verbatim}
\begin{enumerate}[label=\Alph*)]
\item In the current working directory
\item In the parent of the current working directory
\item In the root directory
\item In your home directory
\item In /usr/include
\end{enumerate}
\end{frame}
\section{Chapter 6}
\begin{frame}[fragile]
Is there a difference between these two commands?
\begin{verbatim}
$ ls | head -1
$ ls > temp; head -1 < temp
\end{verbatim}
\begin{enumerate}[label=\Alph*)]
\item No, they do the same thing
\item The output will be the same, but the side effects will be different
\item In some cases the output will be the same, but the side effects will be different. In other cases the output will be different.
\item Yes, they do completely different things
\end{enumerate}
\end{frame}
\section{Chapter 25}
\begin{frame}[fragile]
What will the following script do?
\begin{verbatim}
#!/bin/bash
year = $1
mkdir $year
\end{verbatim}
\begin{enumerate}[label=\Alph*)]
\item Create a directory
\item Create a directory, and print a confirmation message
\item Silently fail to create a directory
\item Fail to create a directory, and print a usage message for mkdir
\item I have no idea
\end{enumerate}
\end{frame}
\section{Chapter 32}
\begin{frame}[fragile]
Within a shell script, \$0 provides the name of the shell script, as it was called at the command line.
\ \\
What do you think the following command will print?
\begin{verbatim}
$ echo $0
\end{verbatim}
\begin{enumerate}[label=\Alph*)]
\item A blank line
\item An error message
\item Something else
\item I have no idea
\end{enumerate}
\end{frame}
\end{document}