<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Linux Certification LPIC - 117-102-109</title>
    <link>http://www.lpi-certification.de/</link>
    <description>Schulung zur LPI-Prüfung des Linux Professional Institutes</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.5.3 - http://www.s9y.org/</generator>
    
    

<item>
    <title>Funktionen auf der bash</title>
    <link>http://www.lpi-certification.de/archives/101-Funktionen-auf-der-bash.html</link>
            <category>117-102-109</category>
    
    <comments>http://www.lpi-certification.de/archives/101-Funktionen-auf-der-bash.html#comments</comments>
    <wfw:comment>http://www.lpi-certification.de/wfwcomment.php?cid=101</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.lpi-certification.de/rss.php?version=2.0&amp;type=comments&amp;cid=101</wfw:commentRss>
    

    <author>nospam@example.com (LPIC)</author>
    <content:encoded>
    Die bash kennt auch Funktionen. &lt;br /&gt;
Damit kann man eine Serie von Befehlen zu einem zusammenfassen:&lt;br /&gt;
&lt;blockquote&gt;&lt;strong&gt;function&lt;/strong&gt; name ()&lt;br /&gt;
{&lt;br /&gt;
        Befehl1&lt;br /&gt;
        Befehl2&lt;br /&gt;
        Befehl3&lt;br /&gt;
}&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Alle zur Zeit deklarierten Funktionen können durch den eingebauten &quot;&lt;strong&gt;declare&lt;/strong&gt;&quot;-Befehl mit der Option &quot;&lt;strong&gt;-f&lt;/strong&gt;&quot; angezeigt werden. 
    </content:encoded>

    <pubDate>Tue, 29 May 2007 00:05:03 +0200</pubDate>
    <guid isPermaLink="false">http://www.lpi-certification.de/archives/101-guid.html</guid>
    
</item>
<item>
    <title>Schleifen-Strukturen auf der bash</title>
    <link>http://www.lpi-certification.de/archives/84-Schleifen-Strukturen-auf-der-bash.html</link>
            <category>117-102-109</category>
    
    <comments>http://www.lpi-certification.de/archives/84-Schleifen-Strukturen-auf-der-bash.html#comments</comments>
    <wfw:comment>http://www.lpi-certification.de/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.lpi-certification.de/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nospam@example.com (LPIC)</author>
    <content:encoded>
    Die fußgesteuerte Schleife ist die &quot;&lt;strong&gt;do&lt;/strong&gt;&quot;-Schleife, wird durchlaufen bis das Ergebnis des letzten Programms wahr, also ungleich 0, ist. Die &quot;do&quot;-Schleife wird mit &quot;&lt;strong&gt;done&lt;/strong&gt;&quot; beendet.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;#!/bin/bash&lt;br /&gt;
for i in $(ls -t *$1*.ts); do&lt;br /&gt;
  ffmpeg -i $i -target vcd $i.mpg&lt;br /&gt;
  rm -f $i&lt;br /&gt;
done&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Eine richtige Zählschleife ist die &quot;&lt;strong&gt;for&lt;/strong&gt;&quot;-Schleife auf der bash nicht, obwohl man das vom Namen her vermuten könnte. Sie wird einmal für jedes Argument einer Liste durchlaufen. 
    </content:encoded>

    <pubDate>Wed, 23 May 2007 12:08:21 +0200</pubDate>
    <guid isPermaLink="false">http://www.lpi-certification.de/archives/84-guid.html</guid>
    
</item>
<item>
    <title>Umgebungsvariablen der bash</title>
    <link>http://www.lpi-certification.de/archives/81-Umgebungsvariablen-der-bash.html</link>
            <category>117-102-109</category>
    
    <comments>http://www.lpi-certification.de/archives/81-Umgebungsvariablen-der-bash.html#comments</comments>
    <wfw:comment>http://www.lpi-certification.de/wfwcomment.php?cid=81</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.lpi-certification.de/rss.php?version=2.0&amp;type=comments&amp;cid=81</wfw:commentRss>
    

    <author>nospam@example.com (LPIC)</author>
    <content:encoded>
    Variablen der bash haben ein Dollar-Zeichen(=&quot;$&quot;) vor dem Variablennamen (wie in PHP).&lt;br /&gt;
&lt;br /&gt;
Im Gegensatz zu PHP steht bei einer Zuweisung auf der linken Seite kein Dollarzeichen vor dem Variablen-Namen!&lt;br /&gt;
&lt;blockquote&gt;test1=&quot;hallo&quot;&lt;br /&gt;
test2=&lt;strong&gt;$&lt;/strong&gt;test1&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Alle Umgebungsvariablen lassen sich mit dem Befehl &quot;&lt;strong&gt;env&lt;/strong&gt;&quot; augeben.&lt;br /&gt;
&lt;br /&gt;
Der Befehl &quot;&lt;strong&gt;unset&lt;/strong&gt;&quot; löscht Variablen wieder.&lt;br /&gt;
&lt;br /&gt;
Um Umgebungsvariablen für alle Benutzer zu setzen bieten sich die Dateien &quot;/etc/profile&quot; an. Das könnte z.B. die Angabe des Suchpfads mit der Variablen &quot;PATH&quot; oder andere übliche wie &quot;LANG&quot;, &quot;HOME&quot;, &quot;PWD&quot;...&lt;br /&gt;
&lt;br /&gt;
Um die Variablen für einen bestimmten User zu setzen eher &quot;&lt;strong&gt;~/.bash_profile&lt;/strong&gt;&quot; im Home-Verzeichnis.&lt;br /&gt;
&lt;br /&gt;
Mit &quot;EXPORT&quot; werden Variablen auch für die aufrufende Shell gültig. Hier auch ohne Dollar-Zeichen vorweg! &quot;EXPORT&quot; muss auch für alle Systemvariablen genutzt werden, die im Profil gesetzt werden sollen, damit sie auch nach Ablauf des Skripts noch im System gültig sind.&lt;br /&gt;
&lt;blockquote&gt;DISPLAY=&quot;$remhost&quot;:0.0&lt;br /&gt;
export DISPLAY&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
Aliase und Funktionen sind keine Variablen, stehen daher nicht im Profil, sondern in der &quot;&lt;strong&gt;.bashrc&lt;/strong&gt;&quot;. Auch der bevorzugte Editor wird hier festgelegt:&lt;br /&gt;
&lt;blockquote&gt;#export EDITOR=/usr/bin/vim&lt;br /&gt;
export EDITOR=/usr/bin/mcedit&lt;/blockquote&gt; 
    </content:encoded>

    <pubDate>Wed, 23 May 2007 06:41:44 +0200</pubDate>
    <guid isPermaLink="false">http://www.lpi-certification.de/archives/81-guid.html</guid>
    
</item>
<item>
    <title>Text anzeigen zum Login</title>
    <link>http://www.lpi-certification.de/archives/80-Text-anzeigen-zum-Login.html</link>
            <category>117-102-109</category>
    
    <comments>http://www.lpi-certification.de/archives/80-Text-anzeigen-zum-Login.html#comments</comments>
    <wfw:comment>http://www.lpi-certification.de/wfwcomment.php?cid=80</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.lpi-certification.de/rss.php?version=2.0&amp;type=comments&amp;cid=80</wfw:commentRss>
    

    <author>nospam@example.com (LPIC)</author>
    <content:encoded>
    Vor dem Einloggen wird auf der Konsole eine Begrüßungsmeldung angezeit, die in &quot;&lt;strong&gt;/etc/issue&lt;/strong&gt;&quot; gespeichert ist.&lt;br /&gt;
&lt;br /&gt;
Für Remote-Logins über das Netzwerk wird abweichend der Inhalt von &quot;&lt;strong&gt;/etc/issue.net&lt;/strong&gt;&quot; verwendet.&lt;br /&gt;
&lt;br /&gt;
In der Datei &quot;&lt;strong&gt;/etc/motd&lt;/strong&gt;&quot; dagegen ist die Meldung des Tages abgelegt und diese wird nach dem einloggen ausgegeben.&lt;br /&gt;
&lt;br /&gt;
Die momentan eingeloggten Benutzer lassen sich mit &quot;w&quot; oder &quot;who&quot; auflisten, dazu wird der Inhalt der binären Datei &quot;&lt;strong&gt;/var/run/utmp&lt;/strong&gt;&quot; ausgewertet. 
    </content:encoded>

    <pubDate>Tue, 22 May 2007 12:34:43 +0200</pubDate>
    <guid isPermaLink="false">http://www.lpi-certification.de/archives/80-guid.html</guid>
    
</item>

</channel>
</rss>