<?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>Linux Archives - Huahua&#039;s Tech Road</title>
	<atom:link href="https://zxi.mytechroad.com/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://zxi.mytechroad.com/blog/category/linux/</link>
	<description></description>
	<lastBuildDate>Fri, 08 May 2020 08:02:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.8</generator>

<image>
	<url>https://zxi.mytechroad.com/blog/wp-content/uploads/2017/09/cropped-photo-32x32.jpg</url>
	<title>Linux Archives - Huahua&#039;s Tech Road</title>
	<link>https://zxi.mytechroad.com/blog/category/linux/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>玩转Linux命令行 &#8211; 事件处理 &#8211; EP3</title>
		<link>https://zxi.mytechroad.com/blog/linux/linux-cmd-event-processing-ep3/</link>
					<comments>https://zxi.mytechroad.com/blog/linux/linux-cmd-event-processing-ep3/#respond</comments>
		
		<dc:creator><![CDATA[zxi]]></dc:creator>
		<pubDate>Fri, 08 May 2020 07:40:47 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[uniq]]></category>
		<category><![CDATA[xargs]]></category>
		<guid isPermaLink="false">https://zxi.mytechroad.com/blog/?p=6713</guid>

					<description><![CDATA[<p>Download Data [crayon-663bf6f0104fa289240023/] [crayon-663bf6f0104fe770781936/] [crayon-663bf6f010500034710760/] [crayon-663bf6f010501690414455/]</p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/linux/linux-cmd-event-processing-ep3/">玩转Linux命令行 &#8211; 事件处理 &#8211; EP3</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="玩转Linux命令行 - 事件处理 - EP3" width="500" height="375" src="https://www.youtube.com/embed/TWwvJw6UoxY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<h2><strong>Download Data</strong></h2>



<div class="responsive-tabs">
<h2 class="tabtitle">download.sh</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">for i in $(seq -w 01 80)
do  
  curl -O -J https://raw.githubusercontent.com/rozim/ChessData/master/mega2400_part_${i}.pgn
done</pre>
</div></div>



<div class="responsive-tabs">
<h2 class="tabtitle">V1</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">cat *.pgn | grep &quot;Result&quot; | sort | uniq -c</pre>
</div></div>



<div class="responsive-tabs">
<h2 class="tabtitle">V2</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">cat *.pgn | grep &quot;Result&quot; | awk '{ split($0, a, &quot;-&quot;); res = substr(a[1], length(a[1]), 1); if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++;} END { print white+black+draw, white, black, draw }'</pre>
</div></div>



<div class="responsive-tabs">
<h2 class="tabtitle">V3</h2>
<div class="tabcontent">

<pre class="crayon-plain-tag">find . -type f -name '*.pgn' -print0 | xargs -0 -n1 -P8 mawk '/Result/ { split($0, a, &quot;-&quot;); res = substr(a[1], length(a[1]), 1); if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++ } END { print white+black+draw, white, black, draw }' | awk '{games += $1; white += $2; black += $3; draw += $4; } END { print games, white, black, draw }'</pre>
</div></div>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-1.png" alt="" class="wp-image-6724" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-1.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-1-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-1-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-2.png" alt="" class="wp-image-6723" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-2.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-2-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-2-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-3.png" alt="" class="wp-image-6722" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-3.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-3-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-3-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-4.png" alt="" class="wp-image-6721" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-4.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-4-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-4-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-5.png" alt="" class="wp-image-6720" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-5.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-5-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-5-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-6.png" alt="" class="wp-image-6719" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-6.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-6-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-6-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-7.png" alt="" class="wp-image-6718" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-7.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-7-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-7-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-8.png" alt="" class="wp-image-6717" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-8.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-8-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-8-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-9.png" alt="" class="wp-image-6716" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-9.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-9-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd3-9-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-11.png" alt="" class="wp-image-6715" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-11.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-11-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-11-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<figure class="wp-block-image size-large"><img width="960" height="540" src="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-12.png" alt="" class="wp-image-6714" srcset="https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-12.png 960w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-12-300x169.png 300w, https://zxi.mytechroad.com/blog/wp-content/uploads/2020/05/cmd-3-12-768x432.png 768w" sizes="(max-width: 960px) 100vw, 960px" /></figure>



<p></p>
<p>The post <a rel="nofollow" href="https://zxi.mytechroad.com/blog/linux/linux-cmd-event-processing-ep3/">玩转Linux命令行 &#8211; 事件处理 &#8211; EP3</a> appeared first on <a rel="nofollow" href="https://zxi.mytechroad.com/blog">Huahua&#039;s Tech Road</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://zxi.mytechroad.com/blog/linux/linux-cmd-event-processing-ep3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
