<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>PG旅情グルメ日記</title>
    <link>http://www.res-system.com/suzu/PG.php</link>
    <description></description>
    <!-- optional tags -->
    <language>ja</language>           <!-- valid langugae goes here -->
    <generator>Nucleus CMS v3.22</generator>
    <copyright>ｩ</copyright>             <!-- Copyright notice -->
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://www.res-system.com/suzu/PG.php/nucleus/nucleus2.gif</url>
      <title>PG旅情グルメ日記</title>
      <link>http://www.res-system.com/suzu/PG.php</link>
    </image>
    <item>
 <title><![CDATA[シェルスクリプト 設定ファイルを読み込む]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=39</link>
<description><![CDATA[# 環境設定<br />
SETENV=/test/test_release/setenv.conf<br />
<br />
# 環境設定スクリプトの読み込み<br />
if [[ -f "$SETENV" ]]<br />
then<br />
	. $SETENV<br />
else<br />
	echo "環境設定ファイル $SETENV が見つかりません。"<br />
	exit 1<br />
fi<br />
<br />
]]></description>
 <category>Linux</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=39</comments>
 <pubDate>Mon, 2 Jul 2007 21:49:51 +0900</pubDate>
</item><item>
 <title><![CDATA[指定したファイルの指定文字列を置換する]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=38</link>
<description><![CDATA[package パッケージ名;<br />
<br />
import java.io.BufferedReader;<br />
import java.io.BufferedWriter;<br />
import java.io.File;<br />
import java.io.FileReader;<br />
import java.io.FileWriter;<br />
import java.io.IOException;<br />
import java.io.PrintWriter;<br />
import java.util.ArrayList;<br />
<br />
/**<br />
 * 引数で指定したファイルを指定した文字列で置換える。<br />
 * java tool.Replace [ファイル名] [置換元文字列] [置換文字列]<br />
 * 例 C:\temp.txt  testtarget testreplace する します<br />
 */<br />
public class Replace {<br />
	/** 対象文字列 */<br />
	private static String target;<br />
<br />
	/** 置換文字列 */<br />
	private static String replace;<br />
	<br />
	/** 指定ファイル名 */<br />
	private static String filename;<br />
<br />
	public static void main(String[] args) throws IOException {<br />
    	filename = args[0];<br />
    	target = args[1];<br />
    	replace = args[2];<br />
    	searchDir(filename);<br />
  	}<br />
<br />
	/**<br />
	 * 指定ファイルの中に含まれるtargetをreplaceに置換する。<br />
	 * @throws IOException<br />
	*/<br />
	private static void searchDir(String filename) throws IOException {<br />
	<br />
		String[] lines = getLines(filename);<br />
		for (int j = 0; j < lines.length; j++) {<br />
			lines[j] = lines[j].replaceAll(target,replace);<br />
		}<br />
		PrintWriter output =<br />
			new PrintWriter(new BufferedWriter(new FileWriter(filename)));<br />
		for (int j = 0; j < lines.length; j++) {<br />
			output.println(lines[j]);<br />
		}<br />
		output.close();<br />
	}<br />
<br />
	/**<br />
	 * 指定したファイルをテキストストリームで全て読み込んでString配列に<br />
	 * 格納して返します。<br />
	 * @param filePath 指定したテキストファイルのパス<br />
	 * @return 読み込んだファイルの中身<br />
	*/<br />
	private static String[] getLines(String filePath) throws IOException {<br />
		BufferedReader input = new BufferedReader(new FileReader(filePath));<br />
		ArrayList list = new ArrayList(5000);<br />
		String line = null;<br />
		while ((line = input.readLine()) != null) {<br />
			list.add(line);<br />
		}<br />
		String[] lines = new String[list.size()];<br />
		list.toArray(lines);<br />
		input.close();<br />
		return lines;<br />
	}<br />
}<br />
]]></description>
 <category>General</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=38</comments>
 <pubDate>Fri, 15 Jun 2007 00:03:20 +0900</pubDate>
</item><item>
 <title><![CDATA[ファイルの文字列置換、削除、挿入]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=37</link>
<description><![CDATA[sedコマンドは文字列の置換、削除、挿入が行える。<br />
<br />
sed [オプション][コマンド][ファイル名]<br />
<br />
文字列置換する例<br />
<br />
sed　s/パターン/置換文字列/g　[対象ファイル]<br />
<br />
ファイルの指定行を削除する例<br />
<br />
sed '指定行の数値,指定行の数値d' [対象ファイル]<br />
<br />
]]></description>
 <category>Linux</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=37</comments>
 <pubDate>Thu, 7 Jun 2007 22:32:57 +0900</pubDate>
</item><item>
 <title><![CDATA[リモートホストへのファイルの転送]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=36</link>
<description><![CDATA[リモートホストへの転送方法　(scp)<br />
<br />
scp　コマンドはファイルをSSHで暗号化した上で転送してくれるコマンドです。<br />
<br />
ローカルからリモートもしくはリモートからローカルへの転送に使用できます。<br />
<br />
(使用方法)<br />
scp [オプション][転送したいファイル名[ユーザ名]@[ホスト名]:[パス] <br />
<br />
主なオプションは以下の通りになります。<br />
<br />
-r ディレクトリを再帰的にコピーします<br />
-p ファイルのパーミッションや、最終変更時刻を保ったまま転送<br />
-v 経過を詳細に出力<br />
<br />
]]></description>
 <category>Linux</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=36</comments>
 <pubDate>Wed, 6 Jun 2007 23:31:21 +0900</pubDate>
</item><item>
 <title><![CDATA[Oracle テーブルの変更(ALTER TABLE)]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=35</link>
<description><![CDATA[テーブルの変更は ALTER TABLE 文を使用します。<br />
既存のテーブルの定義を変更することができます。<br />
ALTER TABLEには、以下の機能があります。<br />
<pre><code><br />
テーブルに列を追加する <br />
    ALTER TABLE テーブル名 ADD [COLUMN] 列名 データ型 ;<br />
テーブルから列を削除する <br />
    ALTER TABLE テーブル名 ADD テーブル制約の定義 ;<br />
テーブルにテーブル制約を追加する <br />
    ALTER TABLE テーブル名 ADD テーブル制約の定義 ;<br />
テーブルからテーブル制約を削除する <br />
    ALTER TABLE テーブル名 DROP CONSTRAINT テーブル制約の定義<br />
          [ RESTRICT | CASCADE ] ;<br />
列にデフォルト値を追加する<br />
    ALTER TABLE テーブル名<br />
          ALTER [COLUMN] 列名 SET DEFAULT デフォルト値 ; <br />
列からデフォルト値を削除する <br />
    ALTER TABLE テーブル名 ALTER [COLUMN] 列名 DROP DEFAULT ;<br />
</code></pre><br />
]]></description>
 <category>Oracle</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=35</comments>
 <pubDate>Thu, 25 May 2006 17:09:48 +0900</pubDate>
</item><item>
 <title><![CDATA[PHP version_compare(version1,version2 )]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=34</link>
<description><![CDATA[version_compare()は、ふたつの "PHP 標準" バージョン番号文字列を比較します。<br />
version_compare()は、最初のバージョンが 2番目よりも小さい場合に -1、等しい場合に 0、2番目が小さい場合に +1 を返し ます。<br />
version_compare ( string version1, string version2 [, string operator] )のoperator を指定した 場合、特定の関係を調べることができます。<br />
operatorに指定できる演算子は、<, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne です。<br />
operatorを指定した場合、この関数はこの演算子により指定された関係が成り立つ場合にTRUE、そうでない場合に FALSE を返します。]]></description>
 <category>PHP</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=34</comments>
 <pubDate>Fri, 12 May 2006 20:26:00 +0900</pubDate>
</item><item>
 <title><![CDATA[PHP include_once()]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=33</link>
<description><![CDATA[include_once()は、スクリプトの実行時に指定 したファイルを読み込み評価します。<br />
動作は、 include()と似ていますが、ファイルからのコー ドが既に読み込まれている場合は、再度読み込まれないという重要な違い があります。<br />
※大文字小文字を区別しないオペレーティングシステムでは、 動作が意図したものにならない 可能性があるので注意してください。 <br />
以下に例を記述します。<br />
<pre><code>include_once("test.php"); // test.phpを読み込みます<br />
include_once("TEST.php"); // ※はこれもtest.phpを読み込みます! <br />
</code></pre>]]></description>
 <category>PHP</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=33</comments>
 <pubDate>Thu, 11 May 2006 10:30:04 +0900</pubDate>
</item><item>
 <title><![CDATA[PHP intval ($変数, 基数);]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=32</link>
<description><![CDATA[引数で指定されたスカラー型変数を、整数としての値を取得します。<br />
引数には、基数を指定することができます。<br />
省略した場合には、デフォルト値の 10 が使用されます。 <br />
<br />
<pre><code>$test1 ="12345TEST"<br />
  $test2 = intval($test1);<br />
  print $test2;</code></pre><br />
<br />
この場合、12345と表示されます。<br />
]]></description>
 <category>PHP</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=32</comments>
 <pubDate>Wed, 10 May 2006 18:27:22 +0900</pubDate>
</item><item>
 <title><![CDATA[白髭神社]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=31</link>
<description><![CDATA[白髭神社は、滋賀県高島市の明神崎、琵琶湖沿いにあります。<br />
湖の中に鳥居があり、水の青と鳥居の朱がきれいな神社として有名なようです。<br />
<br />
夕暮れ時に神社の境内から眺める琵琶湖はとても綺麗で感動しました。]]></description>
 <category>旅行</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=31</comments>
 <pubDate>Tue, 9 May 2006 17:40:24 +0900</pubDate>
</item><item>
 <title><![CDATA[滋賀県　琵琶湖畔　萩の浜]]></title>
 <link>http://www.res-system.com/suzu/PG.phpindex.php?itemid=30</link>
<description><![CDATA[遠浅の浜と松林に恵まれた琵琶湖有数の水泳場で、日本の渚百選の一つです。<br />
遠浅の浜になっているので夏のシーズンには、小さいお子さんのいる家族でも水泳やキャンプ場として、最適ではないかと思います。<br />
静かで景色が綺麗なのでカップルにもお勧めです。<br />
<br />
実際に、萩の浜でバーキューをやっている家族やグループ、カップルで賑わっていました。<br />
もう少し暖かくなったら、今回は、昼食を食べて少しゆっくりしただけなので<br />
もう１度訪れてバーベキューをやりたいなと思います。]]></description>
 <category>旅行</category>
<comments>http://www.res-system.com/suzu/PG.phpindex.php?itemid=30</comments>
 <pubDate>Tue, 9 May 2006 17:31:44 +0900</pubDate>
</item>
  </channel>
</rss>