<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://mediawiki.netbreaker.de/mediawiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
		<id>http://mediawiki.netbreaker.de/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Grafische_Ausgabe_von_df</id>
		<title>Grafische Ausgabe von df - Versionsgeschichte</title>
		<link rel="self" type="application/atom+xml" href="http://mediawiki.netbreaker.de/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Grafische_Ausgabe_von_df"/>
		<link rel="alternate" type="text/html" href="http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;action=history"/>
		<updated>2026-05-30T01:51:40Z</updated>
		<subtitle>Versionsgeschichte dieser Seite in ConfigWiki</subtitle>
		<generator>MediaWiki 1.19.20+dfsg-0+deb7u3</generator>

	<entry>
		<id>http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=948&amp;oldid=prev</id>
		<title>Thomasm am 20. Dezember 2011 um 09:35 Uhr</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=948&amp;oldid=prev"/>
				<updated>2011-12-20T09:35:02Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Nächstältere Version&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Version vom 20. Dezember 2011, 09:35 Uhr&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Das Ursprungsskript:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Das Ursprungsskript:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; #! /bin/bash&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; #! /bin/bash&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; done&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; done&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Die erste Optimierung (von Daniel Graf):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Die erste Optimierung (von Daniel Graf):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; #!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; #!/bin/bash&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  echo&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  echo&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; done &amp;lt; &amp;lt;(df | egrep &amp;quot;^/&amp;quot; | awk {'print $6&amp;quot; &amp;quot;$5'})&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; done &amp;lt; &amp;lt;(df | egrep &amp;quot;^/&amp;quot; | awk {'print $6&amp;quot; &amp;quot;$5'})&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Statt '''tr''' und '''cut''' wurde '''awk''' zum selektieren der Felder verwendet. Die Überschrift fehlt in diesem Falle aber.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Statt '''tr''' und '''cut''' wurde '''awk''' zum selektieren der Felder verwendet. Die Überschrift fehlt in diesem Falle aber.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''awk''' kann allerdings auch selbst eine formatierte Ausgabe erzeugen. Die ersten beiden anzuzeigenden Spalten waren somit auch ohne Schleife zu erzeugen:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''awk''' kann allerdings auch selbst eine formatierte Ausgabe erzeugen. Die ersten beiden anzuzeigenden Spalten waren somit auch ohne Schleife zu erzeugen:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | awk '$1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | awk '$1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Die sprachunabhängige Kopfzeile dazu wäre:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Die sprachunabhängige Kopfzeile dazu wäre:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | head -1 | awk '{ printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | head -1 | awk '{ printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Das sollte doch auch noch im selben df durch awk zu erledigen zu sein:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Das sollte doch auch noch im selben df durch awk zu erledigen zu sein:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | head -1 | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | head -1 | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Nun zum dynamisch erzeugten Bargraphen:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Nun zum dynamisch erzeugten Bargraphen:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; # Prozentwert vom Prozentzeichen trennen (substr+length - geht das mit awk noch besser?), halbieren und als Ganzzahl (int) zurückgeben:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; # Prozentwert vom Prozentzeichen trennen (substr+length - geht das mit awk noch besser?), halbieren und als Ganzzahl (int) zurückgeben:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; d=int(substr($5,1,length($5)-1)/2);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; d=int(substr($5,1,length($5)-1)/2);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 74:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; # Ausgabe ergänzen:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; # Ausgabe ergänzen:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Wie kann man eine Folge von x Zeichen effektiver erzeugen?&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Wie kann man eine Folge von x Zeichen effektiver erzeugen?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Der endgültige Einzeiler:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Der endgültige Einzeiler:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { d=int(substr($5,1,length($5)-1)/2); \&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; df | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { d=int(substr($5,1,length($5)-1)/2); \&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; b=&amp;quot;&amp;quot;; { for(i=1; i&amp;lt;=d; i++) b=b&amp;quot;#&amp;quot; }; { for(i=d; i&amp;lt;=50; i++) b=b&amp;quot;-&amp;quot; }; printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b ) }'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160; b=&amp;quot;&amp;quot;; { for(i=1; i&amp;lt;=d; i++) b=b&amp;quot;#&amp;quot; }; { for(i=d; i&amp;lt;=50; i++) b=b&amp;quot;-&amp;quot; }; printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b ) }'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/source&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomasm</name></author>	</entry>

	<entry>
		<id>http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=921&amp;oldid=prev</id>
		<title>Thomasm: hat „Grafische&quot; Ausgabe von df“ nach „Grafische Ausgabe von df“ verschoben</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=921&amp;oldid=prev"/>
				<updated>2011-12-19T23:27:31Z</updated>
		
		<summary type="html">&lt;p&gt;hat „&lt;a href=&quot;/mediawiki/index.php/Grafische%22_Ausgabe_von_df&quot; class=&quot;mw-redirect&quot; title=&quot;Grafische&amp;quot; Ausgabe von df&quot;&gt;Grafische&amp;quot; Ausgabe von df&lt;/a&gt;“ nach „&lt;a href=&quot;/mediawiki/index.php/Grafische_Ausgabe_von_df&quot; title=&quot;Grafische Ausgabe von df&quot;&gt;Grafische Ausgabe von df&lt;/a&gt;“ verschoben&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Nächstältere Version&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Version vom 19. Dezember 2011, 23:27 Uhr&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Thomasm</name></author>	</entry>

	<entry>
		<id>http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=911&amp;oldid=prev</id>
		<title>Thomasm am 19. Dezember 2011 um 23:02 Uhr</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=911&amp;oldid=prev"/>
				<updated>2011-12-19T23:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Nächstältere Version&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Version vom 19. Dezember 2011, 23:02 Uhr&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:AWK]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ausgangsbasis ist das Übungsshellskript für ein grafisches '''df''', welches folgende Ausgabe erzeugt:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ausgangsbasis ist das Übungsshellskript für ein grafisches '''df''', welches folgende Ausgabe erzeugt:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomasm</name></author>	</entry>

	<entry>
		<id>http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=910&amp;oldid=prev</id>
		<title>Thomasm: Die Seite wurde neu angelegt: Ausgangsbasis ist das Übungsshellskript für ein grafisches '''df''', welches folgende Ausgabe erzeugt:   Mounted      Use%  /             19% #########---------------...</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.netbreaker.de/mediawiki/index.php?title=Grafische_Ausgabe_von_df&amp;diff=910&amp;oldid=prev"/>
				<updated>2011-12-19T23:02:10Z</updated>
		
		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: Ausgangsbasis ist das Übungsshellskript für ein grafisches &amp;#039;&amp;#039;&amp;#039;df&amp;#039;&amp;#039;&amp;#039;, welches folgende Ausgabe erzeugt:   Mounted      Use%  /             19% #########---------------...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Ausgangsbasis ist das Übungsshellskript für ein grafisches '''df''', welches folgende Ausgabe erzeugt:&lt;br /&gt;
&lt;br /&gt;
 Mounted      Use%&lt;br /&gt;
 /             19% #########------------------------------------------&lt;br /&gt;
 /boot         10% #####----------------------------------------------&lt;br /&gt;
 /home          7% ###------------------------------------------------&lt;br /&gt;
 /tmp           2% #--------------------------------------------------&lt;br /&gt;
 /var          20% ##########-----------------------------------------&lt;br /&gt;
&lt;br /&gt;
D.h. es soll der Mountpoint und die prozentuale Belegung inkl. Überschrift und einem 50 Zeichen langen Bargraph angezeigt werden.&lt;br /&gt;
Es sollen nur &amp;quot;echte&amp;quot; lokale Dateisysteme angezeigt werden.&lt;br /&gt;
&lt;br /&gt;
Das Ursprungsskript:&lt;br /&gt;
 #! /bin/bash&lt;br /&gt;
 &lt;br /&gt;
 LANG=C&lt;br /&gt;
 # gdf -- &amp;quot;Grafische&amp;quot; Ausgabe von df&lt;br /&gt;
 hash=&amp;quot;############################################################&amp;quot;&lt;br /&gt;
 dash=&amp;quot;------------------------------------------------------------&amp;quot;&lt;br /&gt;
 df -P &amp;quot;$@&amp;quot; | tr -s ' ' '\t' | cut -f1,5,6 | while read x pct fs&lt;br /&gt;
 do&lt;br /&gt;
    (echo &amp;quot;$x&amp;quot; | grep -qv &amp;quot;^/&amp;quot; -) &amp;amp;&amp;amp; continue&lt;br /&gt;
    printf &amp;quot;%-12s %4s &amp;quot; $fs $pct&lt;br /&gt;
    if [ &amp;quot;$pct&amp;quot; != &amp;quot;Use%&amp;quot; ]&lt;br /&gt;
    then&lt;br /&gt;
        usedc=$((${#hash}*${pct%\%}/100))&lt;br /&gt;
        echo &amp;quot;${hash:0:$usedc}${dash:0:${#hash}-$usedc}&amp;quot;&lt;br /&gt;
    else&lt;br /&gt;
        echo &amp;quot;&amp;quot;&lt;br /&gt;
    fi&lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Die erste Optimierung (von Daniel Graf):&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 &lt;br /&gt;
 while read part size ; do&lt;br /&gt;
   echo -ne ${part}&amp;quot;\t&amp;quot;${size}&amp;quot;\t&amp;quot;&lt;br /&gt;
   size=$((${size%\%}/2))&lt;br /&gt;
   for dash_count in `seq 1 $size` ; do&lt;br /&gt;
     echo -n '#'&lt;br /&gt;
   done&lt;br /&gt;
   for minus_count in `seq 1 $((50-size))` ; do&lt;br /&gt;
     echo -n '-'&lt;br /&gt;
   done&lt;br /&gt;
   echo&lt;br /&gt;
 done &amp;lt; &amp;lt;(df | egrep &amp;quot;^/&amp;quot; | awk {'print $6&amp;quot; &amp;quot;$5'})&lt;br /&gt;
&lt;br /&gt;
Statt '''tr''' und '''cut''' wurde '''awk''' zum selektieren der Felder verwendet. Die Überschrift fehlt in diesem Falle aber.&lt;br /&gt;
&lt;br /&gt;
'''awk''' kann allerdings auch selbst eine formatierte Ausgabe erzeugen. Die ersten beiden anzuzeigenden Spalten waren somit auch ohne Schleife zu erzeugen:&lt;br /&gt;
 df | awk '$1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;br /&gt;
&lt;br /&gt;
Die sprachunabhängige Kopfzeile dazu wäre:&lt;br /&gt;
 df | head -1 | awk '{ printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;br /&gt;
&lt;br /&gt;
Das sollte doch auch noch im selben df durch awk zu erledigen zu sein:&lt;br /&gt;
 df | head -1 | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5) }'&lt;br /&gt;
&lt;br /&gt;
Nun zum dynamisch erzeugten Bargraphen:&lt;br /&gt;
 # Prozentwert vom Prozentzeichen trennen (substr+length - geht das mit awk noch besser?), halbieren und als Ganzzahl (int) zurückgeben:&lt;br /&gt;
 d=int(substr($5,1,length($5)-1)/2);&lt;br /&gt;
 &lt;br /&gt;
 # Bargraph leeren:&lt;br /&gt;
 b=&amp;quot;&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 # mit dem used-Anteil füllen:&lt;br /&gt;
 { for(i=1; i&amp;lt;=d; i++) b=b&amp;quot;#&amp;quot; };&lt;br /&gt;
 &lt;br /&gt;
 # auffüllen bis 50 Zeichen:&lt;br /&gt;
 { for(i=d; i&amp;lt;=50; i++) b=b&amp;quot;-&amp;quot; };&lt;br /&gt;
 &lt;br /&gt;
 # Ausgabe ergänzen:&lt;br /&gt;
 printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b )&lt;br /&gt;
&lt;br /&gt;
Wie kann man eine Folge von x Zeichen effektiver erzeugen?&lt;br /&gt;
&lt;br /&gt;
Der endgültige Einzeiler:&lt;br /&gt;
 df | awk 'headline==0 { printf(&amp;quot;%-12s %4s\n&amp;quot;, $6, $5); headline=1 }; $1 ~ /^\/]*/ { d=int(substr($5,1,length($5)-1)/2); \&lt;br /&gt;
 b=&amp;quot;&amp;quot;; { for(i=1; i&amp;lt;=d; i++) b=b&amp;quot;#&amp;quot; }; { for(i=d; i&amp;lt;=50; i++) b=b&amp;quot;-&amp;quot; }; printf(&amp;quot;%-12s %4s %s\n&amp;quot;, $6, $5, b ) }'&lt;/div&gt;</summary>
		<author><name>Thomasm</name></author>	</entry>

	</feed>