046e81f80578004cbda92121382cd1752ad13f89
[linuxnijmegen-bash.git] / part1 / syntax.tex
1 \subsection{Syntax}
2
3 \begin{frame}[fragile]
4 \frametitle{Syntax}
5 \begin{enumerate}
6 \item Long option
7 \item Short options
8 \item Arguments
9 \item ...
10 \end{enumerate}
11 \begin{lstlisting}[style=bashregel]
12 ls -a -l -h --color=auto /home/frobnicator/directory
13 \end{lstlisting}
14 \begin{lstlisting}[style=bashregel]
15 ls --all -lh
16 \end{lstlisting}
17 \end{frame}
18
19 \subsection{Quoting}
20
21 \begin{frame}[fragile]
22 \frametitle{Speciale karakters}
23 \begin{lstlisting}[style=bashregel]
24 mkdir /home/frobnicator/map
25 \end{lstlisting}
26 \begin{lstlisting}[style=bashregel]
27 mkdir "/home/frobnicator/mooie map"
28 mkdir /home/frobnicator/mooie\ map
29 mkdir '/home/frobnicator/mooie map'
30 \end{lstlisting}
31 \begin{lstlisting}[style=bashregel]
32 mkdir /home/frobnicator/mooiste\ map\ '!'
33 mkdir '/home/frobnicator/mooiste map!'
34 \end{lstlisting}
35 \end{frame}
36
37 \subsection{Man}
38
39 \begin{frame}[fragile]
40 \frametitle{Radeloos? Manpage}
41 \begin{lstlisting}[style=bashregel,basicstyle=\tiny]
42 LS(1) User Commands LS(1)
43
44 NAME
45 ls - list directory contents
46
47 SYNOPSIS
48 ls [OPTION]... [FILE]...
49
50 DESCRIPTION
51 List information about the FILEs (the current directory by default). Sort entries alphabeti-
52 cally if none of -cftuvSUX nor --sort is specified.
53
54 Mandatory arguments to long options are mandatory for short options too.
55
56 -a, --all
57 do not ignore entries starting with .
58
59 -A, --almost-all
60 do not list implied . and ..
61
62 --author
63 with -l, print the author of each file
64
65 -b, --escape
66 print C-style escapes for nongraphic characters
67 \end{lstlisting}
68 \end{frame}
69
70 \subsection{Unix filosofie}
71 \begin{frame}
72 \frametitle{Unix filosofie}
73 \includegraphics{syntax_img1.jpg}
74 \end{frame}
75
76 \begin{frame}
77 \frametitle{Richtlijnen}
78 \begin{enumerate}
79 \item Make each program do one thing well.
80 \item Store data in flat text files.
81 \item Make every program a filter.
82 \item ...
83 \end{enumerate}
84 \end{frame}
85
86 \subsection{Forken}
87 \begin{frame}
88 \frametitle{Forken}
89 \begin{block}
90 Achtergrond
91 \end{block}