This commit is contained in:
2019-01-08 13:08:27 +01:00
parent ea67258714
commit 87205c16f0
14 changed files with 201 additions and 36 deletions

126
5.html
View File

@@ -40,7 +40,7 @@
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h1>LINUX</h1>
<h3>Das universelle Betriebssystem</h3>
<p>Eine Einführung - Teil 4
<p>Eine Einführung - Teil 5
<p>
<small>Deutsche Angestellten Akademie</small>
</p>
@@ -51,25 +51,119 @@
</section>
<section>
<h2>vim und emacs</h2>
<h3>Die mächtigen Unix Editoren</h3>
<h2>Bash scripting - Fortsetzung</h2>
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h3>vim</h3>
<ul>
<li class="fragment">ein Editor für die shell </li>
<li class="fragment">immer da, oft in der alten Variante „vi“ </li>
<li class="fragment">Vi IMproved</li>
<li class="fragment">komplett per Kürzel steuerbar </li>
<li class="fragment">umfassend anpassbar </li>
<li class="fragment">erweiterbar </li>
<li class="fragment">syntax highlighting </li>
<li class="fragment">vim ist einfach cool ;-)</li>
</ul>
<section>
<h3>LINKS</h3>
<p>http://tldp.org/LDP/abs/html/complexfunct.html
<p>http://programmingexamples.wikidot.com/bash-scripting#toc24
<p>https://wiki.ubuntuusers.de/Shell/Bash-Skripting-Guide_für_Anfänger/#Quoting
<div>
- script kontrolle ( strg-z etc )
- input
- parameter
- functions
- kontrollstrukturen
-
</section>
<section>
<h3>Variablen</h3>
<pre><code>#!/bin/bash
x=10 #NICHT x = 10 -> keine Leerzeichen!
X=20 #variablen sind Case Sensitive
$y= #NULL variable
echo "x = $x"
echo "X = $X"
echo "y = $y"</code></pre>
</section>
<section>
<h3>Kommentare</h3>
<pre><code>
#!/bin/bash
# Diese Zeile ist ein Kommentar
echo "A comment will follow." # Comment here.
echo "The # here does not begin a comment."
echo 'The # here does not begin a comment.'
echo The \# here does not begin a comment.
echo The # here begins a comment.
echo ${PATH#*:} # Parameter substitution, not a comment.
echo $(( 2#101011 )) # Base conversion, not a comment.
</code>
</pre>
</section>
<section>
<h3>Quotes</h3>
<ul>
<li class="fragment ">Double Quotes: " " -Anything enclose in double quotes removed meaning of that characters (except \ and $).</li>
<li class="fragment ">Single quotes: ' ' - Enclosed in single quotes remains unchanged.</li>
<li class="fragment ">Back quote: ` ` - To execute command</li>
</ul>
</section>
<section>
<h3>Input - Output redirection</h3>
<ul>
<li class="fragment "> > : output in Datei. Best. Datei wird überschrieben!</li>
<li class="fragment "> >> : output an Datei anhängen.</li>
<li class="fragment "> < : Kommando Input aus Datei lesen</li>
</ul>
<pre><code>#!/bin/bash
echo "ls > file_list"
ls > file_list
echo "ls -la >> file_list"
ls -la >> file_list
echo "cat < file_list"
cat < file_list</code></pre>
</section>
<section>
- arithmetik
let "m = 4 * 1024";echo $m
let "m += 15"
let "m -= 3"
let "m /= 5"
let "m %= 10"
let "m++"
let "m--"
let "k = (m < 9) ? 0 : 1"
condition ? value-if-true : value-if-false
Floating Poin:
echo "32.0 + 1.4" | bc
echo `expr $m + 18`
m=`expr $m + 18`
(( m *= 4 ))
</section>
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
</section>
<section>
<h3>Die 5 Level eines Vim Magiers</h3>
<ul>