<?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>HattaraTecLog &#187; シェルスクリプト</title>
	<atom:link href="http://teclog.hattara.info/?cat=21&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://teclog.hattara.info</link>
	<description>LinuxネタとかPHPネタとかの技術ログ</description>
	<lastBuildDate>Tue, 18 Nov 2014 12:15:20 +0000</lastBuildDate>
	<language>ja</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8</generator>
	<item>
		<title>危険なプログラミング25</title>
		<link>http://teclog.hattara.info/?p=65</link>
		<comments>http://teclog.hattara.info/?p=65#comments</comments>
		<pubDate>Thu, 15 Jan 2009 04:43:00 +0000</pubDate>
		<dc:creator><![CDATA[hattara]]></dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[シェルスクリプト]]></category>
		<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[危険]]></category>

		<guid isPermaLink="false">http://teclog.hattara.info/?p=65</guid>
		<description><![CDATA[ウェブの世界を徘徊してたら、見かけました。 海外の有名な人たちが、危険なプログラミング25を発表したようですね [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>ウェブの世界を徘徊してたら、見かけました。</p>
<p>海外の有名な人たちが、危険なプログラミング25を発表したようですね。</p>
<p> </p>
<p>ぱっと見だと、</p>
<p> </p>
<p>　・入力された値のVaidation</p>
<p>　・出力するもののエンコードとエスケープ処理</p>
<p>　・SQLインジェクション</p>
<p>　・クロスサイトスクリプティング</p>
<p>　・OSコマンド系のインジェクション</p>
<p>　　　：</p>
<p> </p>
<p>なんてあたりのが25項目書いてるみたいっすね。</p>
<p> </p>
<p>ちょっと時間ができたら、見返してみようとおもってます。</p>
<p> </p>
<p>もし、お時間がある方はみといたら、どうでしょう。（英語です）</p>
<p>http://www.sans.org/top25errors/?utm_source=web&#038;utm_medium=text-ad&#038;utm_content=Announcement_Bar_20090111&#038;utm_campaign=Top25&#038;ref=37029#s4</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://teclog.hattara.info/?feed=rss2&#038;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>perlとかシェルスクリプトとかでメールを送る</title>
		<link>http://teclog.hattara.info/?p=43</link>
		<comments>http://teclog.hattara.info/?p=43#comments</comments>
		<pubDate>Mon, 20 Oct 2008 10:12:47 +0000</pubDate>
		<dc:creator><![CDATA[hattara]]></dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[シェルスクリプト]]></category>
		<category><![CDATA[shellscript]]></category>

		<guid isPermaLink="false">http://teclog.hattara.info/?p=43</guid>
		<description><![CDATA[ちょっとしたことでメールをしたいときに、 シェルスクリプト(shellscript) とかパール(perl)と [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>ちょっとしたことでメールをしたいときに、<br />
シェルスクリプト(shellscript) とかパール(perl)とかで<br />
メール配信・送信をする訳ですが、以下のような感じでできるのでメモ。</p>
<p>【シェルスクリプト】</p>
<blockquote><p>
#!/bin/sh</p>
<p>wToAddress=&#8221;test@test.com&#8221;</p>
<p>f_SendMail(){<br />
    wToAddress=$1<br />
    wSubject=$2<br />
    wMsg=$3</p>
<p>    echo $wMsg | mail -s &#8220;${wSubject}&#8221; &#8220;${wToAddress}&#8221;<br />
}</p>
<p>f_SendMail &#8220;${wToAddress}&#8221; &#8220;Test Subject.&#8221; &#8220;Test Mail Message.&#8221;</p>
<p>exit
</p></blockquote>
<p>【perl】</p>
<blockquote><p>
#!/usr/bin/perl</p>
<p>my $sendmail = &#8216;/usr/sbin/sendmail&#8217;;<br />
my $nkf = &#8216;/usr/bin/nkf&#8217;;</p>
<p>open(SENDMAIL,&#8221;| $nkf -j | $sendmail -t -i&#8221;);</p>
<p>print SENDMAIL <<'END';<br />
From: test@test.com<br />
To: test_to@test.com<br />
Subject: テストサブジェクト</p>
<p>テストメッセージ</p>
<p>END</p>
<p>close(SENDMAIL);
</p></blockquote>
<p>みたいな感じですね。<br />
シェルスクリプトのほうも、たぶんnkfかませば、日本語いけると思う。<br />
前にやってたような気がするけど、記憶がないので。。</p>
]]></content:encoded>
			<wfw:commentRss>http://teclog.hattara.info/?feed=rss2&#038;p=43</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>言語ごとの真偽値について</title>
		<link>http://teclog.hattara.info/?p=32</link>
		<comments>http://teclog.hattara.info/?p=32#comments</comments>
		<pubDate>Wed, 08 Oct 2008 11:35:51 +0000</pubDate>
		<dc:creator><![CDATA[hattara]]></dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[シェルスクリプト]]></category>
		<category><![CDATA[真偽値]]></category>

		<guid isPermaLink="false">http://teclog.hattara.info/?p=32</guid>
		<description><![CDATA[ちょっと以前から困惑しているのが、 スクリプト実行後の「返り値」といいますか「ステータスコード」といいますか  [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>ちょっと以前から困惑しているのが、<br />
スクリプト実行後の「返り値」といいますか「ステータスコード」といいますか<br />
「戻り値」といいますか、、　「真偽値」といえばいいですかね。</p>
<p>これが、言語によって違うわけですよ。<br />
単純に脳みその中でおかしなことになります。</p>
<p>今まで自分がやってきたものでいえば、以下の3つしかないわけですけど、<br />
3つでも脳みそがおかしくなります。</p>
<p>　シェルスクリプト　：　0：真　1：偽<br />
　perlスクリプト　　：　0：偽　1：真<br />
　phpスクリプト　　 ：　0：偽　1：真</p>
<p>となっているわけですよ。</p>
<p>まあ、シェルスクリプトだけ違うと思えばいいのですが、<br />
シェルとかコマンドライン操作を多くしていた為に、<br />
ちょくちょく間違えます。　こまりものですね。<br />
全部揃えてくれたらいいのに・・・</p>
<p>pythonとかrubyとかはどうなってるんだろ。<br />
気が向いたら調べて追記しようと思う。</p>
]]></content:encoded>
			<wfw:commentRss>http://teclog.hattara.info/?feed=rss2&#038;p=32</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
