summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-basics/sh-programming/pres_sh-programming_de.tex25
1 files changed, 25 insertions, 0 deletions
diff --git a/linux-basics/sh-programming/pres_sh-programming_de.tex b/linux-basics/sh-programming/pres_sh-programming_de.tex
index c7d4849..37fbafb 100644
--- a/linux-basics/sh-programming/pres_sh-programming_de.tex
+++ b/linux-basics/sh-programming/pres_sh-programming_de.tex
@@ -134,6 +134,31 @@ exit 0
\begin{lstlisting}
#!/bin/sh
+VAR=abcdef
+
+case $VAR in
+abc)
+ echo "exactly abc"
+ ;;
+abcdef)
+ echo "exactly abcdef"
+ ;;
+abc*)
+ echo "begins with abc"
+ ;;
+*)
+ echo "match everything"
+ ;;
+esac
+
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Bedingte Verzweigungen}
+\begin{lstlisting}
+#!/bin/sh
+
# Short circuit tests:
make && make install