<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Damiles &#187; awk</title>
	<atom:link href="http://blog.damiles.com/tag/awk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.damiles.com</link>
	<description>Blender, OpenCV, OpenCV, Tutorials and more...</description>
	<lastBuildDate>Mon, 11 Feb 2013 13:36:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>AWK. Calculate mean, min and max</title>
		<link>http://blog.damiles.com/2008/10/awk-calculate-mean-min-and-max/</link>
		<comments>http://blog.damiles.com/2008/10/awk-calculate-mean-min-and-max/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 19:01:49 +0000</pubDate>
		<dc:creator>damiles</dc:creator>
				<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.damiles.com/?p=33</guid>
		<description><![CDATA[AWK is a general purpose programing language that is designed for processing text-based data. This unix command is very powerful and with it we can calculate the mean, min and max of a data stored in file. data.txt: 10 20 50 100 200 500 awk command: awk &#8216;{if(min==&#8221;"){min=max=$1}; if($1&#62;max) {max=$1}; if($1&#60; min) {min=$1}; total+=$1; count+=1} [...]]]></description>
			<content:encoded><![CDATA[<p><strong>AWK</strong> is a general purpose programing language that is designed for processing text-based data. This unix command is very powerful and with it we can calculate the mean, min and max of a data stored in file.</p>
<p>data.txt:</p>
<blockquote><p>10<br />
20<br />
50<br />
100<br />
200<br />
500</p></blockquote>
<p>awk command:</p>
<blockquote><p>awk &#8216;{if(min==&#8221;"){min=max=$1}; if($1&gt;max) {max=$1}; if($1&lt; min) {min=$1}; total+=$1; count+=1} END {print total/count, min, max}&#8217; data.txt</p></blockquote>
<p>Result:</p>
<blockquote><p>146.667 10 500</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.damiles.com/2008/10/awk-calculate-mean-min-and-max/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
