<?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>いちばんやさしいゲームの作り方 &#187; awk</title>
	<atom:link href="http://www.game-create.com/archives/tag/awk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.game-create.com</link>
	<description>文系の人でも、数理学がわからない人でもゲームプログラミングをマスターできるブログ</description>
	<lastBuildDate>Tue, 08 Jun 2010 01:28:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>sed と awk は兄弟じゃなかったのか…</title>
		<link>http://www.game-create.com/archives/1017</link>
		<comments>http://www.game-create.com/archives/1017#comments</comments>
		<pubDate>Sun, 30 Nov 2008 13:00:11 +0000</pubDate>
		<dc:creator>Byerkut</dc:creator>
				<category><![CDATA[ゲームプログラミング]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.game-create.com/?p=1017</guid>
		<description><![CDATA[勝手に勘違いしておりました。

sed はストリームを加工するためのプログラム、 awk はそれでいてデータの形式にデータベースが想定されているプログラムなんですね。 sed の後続プログラムが awk という訳ではない [...]]]></description>
			<content:encoded><![CDATA[<p>勝手に勘違いしておりました。</p>
<p><span id="more-1017"></span></p>
<p>sed はストリームを加工するためのプログラム、 awk はそれでいてデータの形式にデータベースが想定されているプログラムなんですね。 sed の後続プログラムが awk という訳ではないんです。つまり、使い分けが必要なプログラムだったのです。</p>
<p>「ストリームを加工」というのがよくわからないかもしれませんが、たとえば標準入力から標準出力へなどという場合の、データの流れを指します。 stdin.txt というファイルのデータを受け取り、出力を stdout.txt というファイルに書き込む場合は次のように書きます。</p>
<div class="hl-surround" ><div class="hl-main"><pre># Unix, Linux
&gt; cat stdin.txt | program &gt; stdout.txt
# Windows
&gt; type stdin.txt | program.exe &gt; stdout.txt</pre></div></div>
<p>これは自分がわかりやすいのでよく使っているのですが、次のように書くのが一般的です。</p>
<div class="hl-surround" ><div class="hl-main"><pre># Unix, Linux
&gt; program &lt;stdin.txt &gt; stdout.txt
# Windows
&gt; program.exe &lt;stdin.txt &gt; stdout.txt</pre></div></div>
<p>プログラムのリファクタリングやデータの整形など大活躍の sed と awk ですが Windows ユーザの方でも Cygwin をインストールすれば使うことができます。秀丸なんかではこなせない変換には彼らの出番です。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.game-create.com/archives/1017/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

