<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Bash_test_Kommando</id>
	<title>Bash test Kommando - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ixheim.de/index.php?action=history&amp;feed=atom&amp;title=Bash_test_Kommando"/>
	<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Bash_test_Kommando&amp;action=history"/>
	<updated>2026-12-04T12:52:16Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Xinux Wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Bash_test_Kommando&amp;diff=54041&amp;oldid=prev</id>
		<title>Maximilian.pottgiesser am 6. Juni 2024 um 07:03 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Bash_test_Kommando&amp;diff=54041&amp;oldid=prev"/>
		<updated>2024-06-06T07:03:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 6. Juni 2024, 07:03 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l86&quot;&gt;Zeile 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 86:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*! test -r /etc/shadow &amp;amp;&amp;amp;  echo so ist es richtig&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*! test -r /etc/shadow &amp;amp;&amp;amp;  echo so ist es richtig&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  so ist es richtig&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  so ist es richtig&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Das neue Test Kommando=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*&quot;[[&quot; ist Bashs Verbesserung des &quot;[&quot; Befehls. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Es ist die bessere  Wahl, wenn Sie Skripte schreiben, die auf Bash abzielen. Meine Favoriten sind:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Es ist eine syntaktische Funktion der Shell, daher weist sie ein besonderes Verhalten auf, das &quot;[&quot; nicht hat.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Variablen müssen nicht mehr quotiert werden, da leere Zeichenfolgen und Zeichenfolgen mit Leerzeichen intuitiver behandelt werden. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Zum Beispiel müssen Sie mit &quot;[&quot; schreiben.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if [ -f &quot;$ FILE&quot;]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*um leere Zeichenfolgen oder Dateinamen mit Leerzeichen richtig zu behandeln. Mit &quot;[[&quot; sind die Anführungszeichen unnötig:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if [[ -f $ FILE ]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Da es sich um eine syntaktische Funktion handelt, können Sie &amp;amp;&amp;amp; und || verwenden Operatoren für Boolesche Tests und &amp;lt;und&amp;gt; für Zeichenfolgenvergleiche. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[ kann dies nicht tun, da es sich um einen regulären Befehl handelt und &amp;amp;&amp;amp;, ||, &amp;lt;und&amp;gt; nicht als Befehlszeilenargumente an reguläre Befehle übergeben werden.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Es hat einen wunderbaren Operator = ~, um Übereinstimmungen mit regulären Ausdrücken zu erstellen. Mit [ könntest du schreiben&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if [&quot;$ ANSWER&quot; = y -o &quot;$ ANSWER&quot; = yes]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Mit [[ können Sie dies als schreiben&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;if [[ $ ANSWER = ~ ^ y (es)? ]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Sie können sogar auf die erfassten Gruppen zugreifen, die in BASH_REMATCH gespeichert sind. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Zum Beispiel wäre $ {BASH_REMATCH [1]} &quot;es&quot;, wenn Sie oben ein vollständiges &quot;ja&quot; eingeben.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Sie erhalten die Mustererkennung aka Globbing kostenlos. &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Vielleicht sind Sie weniger streng im Schreiben von Ja. Vielleicht bist du okay, wenn der Benutzer y-irgendetwas eingibt. Haben Sie sich versichert:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*wenn $ ANSWER = y *&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key my_wiki:diff:1.41:old-54017:rev-54041:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Maximilian.pottgiesser</name></author>
	</entry>
	<entry>
		<id>https://wiki.ixheim.de/index.php?title=Bash_test_Kommando&amp;diff=54017&amp;oldid=prev</id>
		<title>Maximilian.pottgiesser: Die Seite wurde neu angelegt: „=test-Kommando= Der eingebaute Befehl &#039;&#039;test&#039;&#039; gibt sein Ergebnis als Returncode zurück. Dieser Befehl wird daher oft in  Kontrollstrukturen der bash zur Verz…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.ixheim.de/index.php?title=Bash_test_Kommando&amp;diff=54017&amp;oldid=prev"/>
		<updated>2024-06-06T06:48:52Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „=test-Kommando= Der eingebaute Befehl &amp;#039;&amp;#039;test&amp;#039;&amp;#039; gibt sein Ergebnis als Returncode zurück. Dieser Befehl wird daher oft in  Kontrollstrukturen der bash zur Verz…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=test-Kommando=&lt;br /&gt;
Der eingebaute Befehl &amp;#039;&amp;#039;test&amp;#039;&amp;#039; gibt sein Ergebnis als Returncode zurück. Dieser Befehl wird daher oft in &lt;br /&gt;
Kontrollstrukturen der bash zur Verzweigung verwendet.&lt;br /&gt;
&lt;br /&gt;
Es existieren 2 Schreibweisen:	&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; bedingung&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;[&amp;#039;&amp;#039;&amp;#039; bedingung &amp;#039;&amp;#039;&amp;#039;]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Ist das von &amp;#039;&amp;#039;bedingung&amp;#039;&amp;#039; zurückgelieferte Ergebnis wahr, wird der Returncode 0 übergeben, sonst ungleich 0.&lt;br /&gt;
&amp;#039;&amp;#039;bedingung&amp;#039;&amp;#039; kann ein numerischer Vergleich, ein Stringvergleich, eine Prüfung von Objekteigenschaften oder &lt;br /&gt;
eine beliebige Kombination der vorhergehenden sein.&lt;br /&gt;
&lt;br /&gt;
==Numerischer Vergleich==&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; zahl1 &amp;#039;&amp;#039;&amp;#039;-op&amp;#039;&amp;#039;&amp;#039; zahl2			(op: eq, ne, lt, gt, ge, le)&lt;br /&gt;
*ZAHL=4&lt;br /&gt;
*test $ZAHL -eq &amp;quot;4&amp;quot; &amp;amp;&amp;amp; echo stimmt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| -eq&lt;br /&gt;
| gleich&lt;br /&gt;
|- &lt;br /&gt;
| -ne&lt;br /&gt;
| ungleich&lt;br /&gt;
|-&lt;br /&gt;
| -lt &lt;br /&gt;
| kleiner&lt;br /&gt;
|-&lt;br /&gt;
| -gt&lt;br /&gt;
| größer&lt;br /&gt;
|-&lt;br /&gt;
| -ge&lt;br /&gt;
| größer oder gleich&lt;br /&gt;
|- &lt;br /&gt;
| -le&lt;br /&gt;
| kleiner oder gleich&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Stringvergleich==&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; string1 &amp;#039;&amp;#039;&amp;#039;=&amp;#039;&amp;#039;&amp;#039; string2&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; string1 &amp;#039;&amp;#039;&amp;#039;!=&amp;#039;&amp;#039;&amp;#039; string2&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; –n string   oder  test string		(Länge von string größer null)&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; –z string	 				(Länge von string gleich null)&lt;br /&gt;
&lt;br /&gt;
*HOBBIT=frodo&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; $HOBBIT &amp;#039;&amp;#039;&amp;#039;=&amp;#039;&amp;#039;&amp;#039; &amp;quot;bilbo&amp;quot; &amp;amp;&amp;amp; echo frodo&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; $HOBBIT &amp;#039;&amp;#039;&amp;#039;=&amp;#039;&amp;#039;&amp;#039; &amp;quot;bilbo&amp;quot; &amp;amp;&amp;amp; echo bilbo&lt;br /&gt;
*HOBBIT=bilbo&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;test&amp;#039;&amp;#039;&amp;#039; $HOBBIT &amp;#039;&amp;#039;&amp;#039;=&amp;#039;&amp;#039;&amp;#039; &amp;quot;bilbo&amp;quot; &amp;amp;&amp;amp; echo bilbo&lt;br /&gt;
 bilbo&lt;br /&gt;
&lt;br /&gt;
==Objekteigenschaften==&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;test -op&amp;#039;&amp;#039;&amp;#039; objekt 	    	&lt;br /&gt;
{| border=1 cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| d ||	Directory &lt;br /&gt;
|-&lt;br /&gt;
| f ||	Datei&lt;br /&gt;
|-&lt;br /&gt;
| s ||	nicht leere Datei								&lt;br /&gt;
|-&lt;br /&gt;
| r ||	leserecht auf das Objekt&lt;br /&gt;
|-&lt;br /&gt;
| w ||  schreibrecht auf das Objekt&lt;br /&gt;
|-&lt;br /&gt;
| x ||	ausführungsrecht auf das Objekt&lt;br /&gt;
|}&lt;br /&gt;
	&lt;br /&gt;
*test -f /etc/shadow &amp;amp;&amp;amp; echo sicheres system&lt;br /&gt;
 sicheres system&lt;br /&gt;
*test -r /etc/shadow || echo so ist es richtig&lt;br /&gt;
 so ist es richtig&lt;br /&gt;
&lt;br /&gt;
==Prioritäten bei logischen Verknüpfungen==&lt;br /&gt;
{| border=1&lt;br /&gt;
| runde Klammer	||	Negation ||	AND ||		OR&lt;br /&gt;
|-&lt;br /&gt;
|	&amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;	||	&amp;#039;&amp;#039;&amp;#039;!&amp;#039;&amp;#039;&amp;#039;	 ||    	&amp;#039;&amp;#039;&amp;#039;-a&amp;#039;&amp;#039;&amp;#039;  ||		&amp;#039;&amp;#039;&amp;#039;-o&amp;#039;&amp;#039;&amp;#039;		&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 	test \&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;&amp;#039; -r dat &amp;#039;&amp;#039;&amp;#039;-o&amp;#039;&amp;#039;&amp;#039; -w dat \&amp;#039;&amp;#039;&amp;#039;)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 	test &amp;#039;&amp;#039;&amp;#039;!&amp;#039;&amp;#039;&amp;#039; \&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;&amp;#039; -r dat &amp;#039;&amp;#039;&amp;#039;-o&amp;#039;&amp;#039;&amp;#039; -w dat \&amp;#039;&amp;#039;&amp;#039;)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 	test &amp;#039;&amp;#039;$name&amp;#039;&amp;#039;;echo $?&lt;br /&gt;
&lt;br /&gt;
*! test -r /etc/shadow &amp;amp;&amp;amp;  echo so ist es richtig&lt;br /&gt;
 so ist es richtig&lt;/div&gt;</summary>
		<author><name>Maximilian.pottgiesser</name></author>
	</entry>
</feed>