linuxkurs/5.html

212 lines
5.6 KiB
HTML
Raw Normal View History

2019-01-02 15:04:16 +01:00
<!doctype html>
<html lang="de">
<meta charset="utf-8">
<title>Einführung in Linux</title>
<meta name="description" content="YALC - Yet Another Linux Course ">
<meta name="author" content="Daniel Schubert">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/league.css" id="theme">
<link rel="icon" href="img/openlogo-nd-25.png" type="img/png">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
<h1>LINUX</h1>
<h3>Das universelle Betriebssystem</h3>
2019-01-08 13:08:27 +01:00
<p>Eine Einführung - Teil 5
2019-01-02 15:04:16 +01:00
<p>
<small>Deutsche Angestellten Akademie</small>
</p>
<aside class="notes">
Frage: Fragen zur letzten Stunde?
</aside>
</section>
<section>
2019-01-08 13:08:27 +01:00
<h2>Bash scripting - Fortsetzung</h2>
2019-01-02 15:04:16 +01:00
</section>
2019-01-08 13:08:27 +01:00
<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>
2019-01-02 15:04:16 +01:00
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
2019-01-08 13:08:27 +01:00
2019-01-02 15:04:16 +01:00
</section>
2019-01-08 13:08:27 +01:00
2019-01-02 15:04:16 +01:00
<section>
<h3>Die 5 Level eines Vim Magiers</h3>
<ul>
<li>Level 0: nichts über vim wissen
<li>Level 1: vim basics kennen
<li>Level 2: den visual mode kennen
<li>Level 3: diverse „motions“ kennen
<li>Level 4: den visual mode nicht brauchen
</ul>
<p>https://danielmiessler.com/study/vim/
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/search/search.js', async: true },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>