\documentclass[10pt]{ictlabtest}
%\documentclass[10pt]{ictlabtest}
\usepackage{rcs,multicol}

\RCS $Revision: 1.0 $


%\usepackage[screen,margin=4mm,centering]{geometry}
%\usepackage{calc,acro,alltt,key,xr,nick,color,multicol}
\usepackage{xr,color,alltt}
%\geometry{left=10mm, right=10mm}
\externaldocument[lt-]%
{../../linux_training-plus-config-files-ossi/build/masterfile}

\usepackage[pdfpagemode=None,pdfauthor={Nick Urbanik}]{hyperref}

\newcommand*{\labTitle}{Quiz 9: Shell Programming, Secure Shell}
\renewcommand*{\subject}{Operating Systems and Systems Integration}

\providecommand*{\RPM}{\acro{RPM}\xspace}
\providecommand*{\CD}{\acro{CD}\xspace}

%\setlength{\paperwidth}{260mm}
%\setlength{\paperheight}{310mm}

\makeatletter
\renewcommand\theenumii{\@Alph\c@enumii}
\makeatother
%\newcommand*{\margin}{5mm}
%\renewcommand*{\slideleftmargin}{\margin}
%\renewcommand*{\sliderightmargin}{\margin}
%\renewcommand*{\slidetopmargin}{\margin}
%\renewcommand*{\slidetopmargin}{\margin}
%\renewcommand*{\slidebottommargin}{\margin}
%\renewcommand*{\slidetopmargin}{0pt}
%\renewcommand*{\slidebottommargin}{-50pt}

% Do not set paperwidth or paperheight.

%\setlength{\slidewidth}{297mm-2\margin}
%\setlength{\slideheight}{210mm-2\margin}
%\setlength{\slideheight}{210mm}

%\slideframe[]{none}
%\setlength{\slideframesep}{0pt}
%\slidesmag{2}
%\setcounter{finalcolumnbadness}{10000}
%\setcounter{columnbadness}{10000}

\definecolor{light-blue}{rgb}{0.4,0.4,1}
\newcommand*{\gl}[1]{\textcolor{light-blue}{#1}} % good link
\newcommand*{\ex}[1]{\textcolor{green}{#1}} % executable file
\newcommand*{\bl}[1]{\colorbox{red}{\textcolor{white}{\textbf{#1}}}} % bad link

\begin{document}
%% \raggedright
%% \pagestyle{empty}
%% %\Large
%% %\tableofcontents
%% %\begin{slide}
%% \begin{center}
%%   \par\vspace*{\fill}\par
%%   \begin{minipage}[c]{0.99\linewidth}
%%     \centering {\Huge\sffamily\bfseries Any marks not recognised by
%%       the Optical Mark Recognition (OMR) machine will get ZERO marks
%% \par\vspace*{0.1\textheight}\par
%% Correct mistakes with an eraser, correction pen or white tape; it is
%% not enough to put a cross through the circle
%% \par\vspace*{0.1\textheight}\par
%% Errors in student number get ZERO marks}
%%   \end{minipage}
%%   \par\vspace*{\fill}\par
%% \end{center}
%% \clearpage
%% %\par\vspace*{-15mm}\par
%%   \begin{center}
%% \bfseries
%% {\Large Operating Systems and Systems Integration \  Quick Quiz 3}
%%   \end{center}

\noindent%
\textbf{Do not refer to any printed material.\\  No talking or discussion is
allowed until the answer sheets are all collected.}
%\extraslideheight{0pt}
%\enlargethispage*{2\baselineskip}
%\large%
%\begin{multicols}{2}
%\setcounter{columnbadness}{10000}
%\setcounter{unbalance}{2}
\paragraph{Review:}


\begin{enumerate}
\item Which of the following software fully supports regular
  expressions:
  \begin{enumerate}
  \item Java
  \item Microsoft Word
  \item VB.NET
  \item C\#
  \item All the above
  \end{enumerate}

\item Only one of the following regular expressions matches a line
  that contains \texttt{exactly} five characters:
  \begin{enumerate}
  \item
\begin{verbatim}
'.....'
\end{verbatim}
  \item
\begin{verbatim}
'{5}'
\end{verbatim}
  \item
\begin{verbatim}
'*****'
\end{verbatim}
  \item
\begin{verbatim}
'?????'
\end{verbatim}
  \item
\begin{verbatim}
'^.....$'
\end{verbatim}%$
  \end{enumerate}

  
\item Which of the following regular expressions matches at least
  three letter `\texttt{a}'s \emph{anywhere} on the line, i.e., even
  if there are any number of other characters between the `\texttt{a}'s?
  \begin{enumerate}
  \item 
\begin{verbatim}
'a.*a.*a'
\end{verbatim}
  \item
\begin{verbatim}
'aaa'
\end{verbatim}
  \item
\begin{verbatim}
'a{3}'
\end{verbatim}
  \item
\begin{verbatim}
'a?a?a'
\end{verbatim}
  \item
\begin{verbatim}
'^AAA$'
\end{verbatim}
  \end{enumerate}
\end{enumerate}

%% \item the directory \texttt{/proc} contains information that is:
%%   \begin{enumerate}
%%   \item dynamic information about the OS and hardware
%%   \item a type of relational database; SQL is always used to query it
%%   \item a list of network \textbf{proc}ters
%%   \item is unreadable except by the OS kernel
%%   \item contains entirely static data that is fixed when the computer
%%     boots 
%%   \end{enumerate}

\vspace*{-5mm}

\paragraph{Preparation:}

\begin{enumerate}
\setcounter{enumi}{3}

\item \emph{Secure Shell} is:
  \begin{enumerate}
  \item what Nick uses to connect to his desktop machine to show the
    lectures and laboratory work
  \item not useful for remote administration
  \item always requires you to use a special hardware password device
    to authenticate yourself, rather like a pocket calculator
  \item is just another name for \texttt{bash}
  \item is not useful for port forwarding, or carrying other network
    traffic, and does not use encryption
  \end{enumerate}

\item \emph{awk} is:
  \begin{enumerate}
  \item a programming language useful for separating input data into
    columns and operating on them
  \item short for \textbf{\underline{awk}}ward, because the syntax is
    very different from Java, and is rather awkward to learn
  \item short for ``\textbf{\underline{a}}pples,
    \textbf{\underline{w}}atermellon and
    \textbf{\underline{k}}umquat''
  \item does not support regular expressions
  \item another word for metacharacter
  \end{enumerate}
\end{enumerate}

%% \item Functions in the shell:
%%   \begin{enumerate}
%%   \item are not \emph{actual} functions, but are separate shell
%%     scripts that are loaded at run time
%%   \item are not supported in version~2.x of Bash;
%%   \item are less useful than in other programming languages
%%   \item Cannot accept function parameters
%%   \item Do not start a new process
%%   %\item are not used as much as \emph{shell objects}
%%   \end{enumerate}
%\end{multicols}
%\end{slide}
\end{document}
