<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/toyoken/">
    <title>toyoken @ ウィキ</title>
    <link>http://w.atwiki.jp/toyoken/</link>
    <atom:link href="https://w.atwiki.jp/toyoken/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>toyoken @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2015-01-24T22:19:07+09:00</dc:date>
    <utime>1422105547</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/23.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/22.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/21.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/20.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/19.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/toyoken/pages/17.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/26.html">
    <title>Shell</title>
    <link>https://w.atwiki.jp/toyoken/pages/26.html</link>
    <description>
      ◆文字コード変換シェル
------------------------

#!/bin/sh

CMD=`find -type f`

for file in ${CMD}; do
  FILENAME1=${file}_tmp
  FILENAME2=${file}_tmp2

  sed -e &#039;s/¥r/¥n/&#039; ${file} &gt; ${FILENAME1}
  iconv -t UTF-8 ${FILENAME1} &gt; ${FILENAME2}

  rm -f ${file}
  rm -f ${FILENAME1}
  mv ${FILENAME2}  ${file}
  
  echo ${file} ...Exchange OK.
  chmod 775 ${0}
done    </description>
    <dc:date>2015-01-24T22:19:07+09:00</dc:date>
    <utime>1422105547</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/25.html">
    <title>Stringクラス</title>
    <link>https://w.atwiki.jp/toyoken/pages/25.html</link>
    <description>
      ■ヘッダ

#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;vector&gt;

class TString
{
  private:
    std::string _str;                     // 文字列 
    std::vector&lt;std::string&gt; _splitItem;  // 分解文字列
  public:
    TString( const char* pcData );                 // コンストラクタ
    ~TString();                                    // デストラクタ
    std::string GetString();                       // 文字列取得
    const char* GetCString();                      // 文字列取得
    int         SetString( const char* pcData );   // 文字列設定
    int         AddString( const char* pcData );   // 文字列追加
    void        Clear();                           // 文字列初期化
    int         GetSize();                         // 文字列のサイズ取得
    int         Replace( const char* pcBefor,
                         const char* pcAfter );    // 文字列初期化
    int         Split( const char* pcDelim );      // 文字列の分解
    std::string GetSplitItem( unsigned int nNum ); // 分解した文字列の要素数取得
};

■ソース
#include &quot;TString.h&quot;

/**************    </description>
    <dc:date>2014-07-21T02:23:59+09:00</dc:date>
    <utime>1405877039</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/24.html">
    <title>カレンダー(Excel)</title>
    <link>https://w.atwiki.jp/toyoken/pages/24.html</link>
    <description>
      [[カレンダー生成ツール&gt;http://cdn54.atwikiimg.com/toyoken/?cmd=upload&amp;act=open&amp;page=%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC%28Excel%29&amp;file=Calendar.xls]]    </description>
    <dc:date>2014-02-03T00:09:07+09:00</dc:date>
    <utime>1391353747</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/23.html">
    <title>共有メモリ</title>
    <link>https://w.atwiki.jp/toyoken/pages/23.html</link>
    <description>
      #include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/ipc.h&gt;
#include &lt;sys/shm.h&gt;
#include &quot;CmnDefine.h&quot;
#include &quot;CmnStruct.h&quot;
#include &quot;CmnFunc.h&quot;

/* ã§óLÉÅÉÇÉäÉAÉ^ÉbÉ` */
int Shm_Attach( key_t key, T_SHM_DATE** ptShmData, int* piShmID )
{
	/* ÉpÉâÉÅÅ[É^É`ÉFÉbÉN */
	if( NULL == piShmID || NULL == ptShmData )
	{
		ERRLOG( &quot;piShmID=[%x]&quot;, piShmID );
		return RET_NG;
	}
	
	/* ã§óLÉÅÉÇÉäópKeyéÊìæ */
	//key = ftok( &quot;&quot;, &#039;R&#039; );
	//if( key == -1 )
	//{
	//	ERRLOG(&quot;ftok Error.&quot;);
	//	return RET_NG;
	//}
	
	/* ã§óLÉÅÉÇÉäIDéÊìæ */
	*piShmID = shmget( key, sizeof(T_SHM_DATE), IPC_CREAT | 0666 );
	if( *piShmID &lt; 0 )
	{
		ERRLOG(&quot;shmget Error.&quot;);
		return RET_NG;
	}
	
	DBGLOG( &quot;*piShmID=[%d]&quot;, *piShmID );
	
	/* ã§óLÉÅÉÇÉäÇ…ÉAÉ^ÉbÉ` */
	*ptShmData = (T_SHM_DATE*)shmat( *piShmID, 0, 0 );
	if( *ptShmData == (void*)-1 )
	{
		ERRLOG(&quot;shmat Error.&quot;);
		return RET_NG;
	}
	
	DBGLOG( &quot;*ptShmData=[%x]&quot;, *ptShmData );
	    </description>
    <dc:date>2014-01-31T09:06:53+09:00</dc:date>
    <utime>1391126813</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/22.html">
    <title>低水準関数</title>
    <link>https://w.atwiki.jp/toyoken/pages/22.html</link>
    <description>
      #include &lt;pwd.h&gt;
#include &lt;grp.h&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;string.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;dirent.h&gt;

int RmDir( const char* pSrc );
int ViewFile( const char* pSrc );
int RemoveFile( const char* pSrc );
int ChownFile( const char* pSrc, const char* tOwner, const char* tGroupe );
int ChmodFile( const char* pSrc, mode_t tMode );
int RenameFile( const char* pSrc, const char* pDst ); // Moveも同様
int MakeDir( const char* pDir );
int CopyFile( const char* pSrc, const char* pDst );

#define ERRLOG()  printf( &quot;Error Line=[%d]\n&quot;, __LINE__ );

int main(int argc, char* argv[])
{
  char* pCmd    = argv[0];
  char* pParam1 = argv[1];
  char* pParam2 = argv[2];

  printf(&quot;argv[0]=[%s]\n&quot;, pCmd );
  printf(&quot;argv[1]=[%s]\n&quot;, pParam1);
  printf(&quot;argv[2]=[%s]\n&quot;, pParam2);

  printf(&quot;main() start\n&quot;);

  RmDir( &quot;test&quot; );

  /**********************************/
  /* chmod */    </description>
    <dc:date>2013-12-01T18:52:51+09:00</dc:date>
    <utime>1385891571</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/21.html">
    <title>makefile2</title>
    <link>https://w.atwiki.jp/toyoken/pages/21.html</link>
    <description>
      
&lt;p&gt;■ソースと同階層のMakefile&lt;/p&gt;
&lt;table cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; width=&quot;451&quot; border=&quot;1&quot; style=&quot;height:479px;width:451px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;p&gt;#!/bin/make&lt;/p&gt;
&lt;p&gt;TARGET   = Sample01&lt;br /&gt;
SRCS     = $(shell ls *.cpp)&lt;br /&gt;
OBJS     = $(SRCS:.cpp=.o)&lt;br /&gt;
CXX      = g++&lt;br /&gt;
CXXFLAGS = -g -O2 -Wall&lt;br /&gt;
LDFLAGS  = -lm -lrt -L/Develop/lib -lCmnFunc&lt;br /&gt;
INCLUDE  = -I../inc -I../../CmnInc&lt;br /&gt;
DEST     = ../../../bin&lt;/p&gt;
&lt;p&gt;.cpp.o:&lt;br /&gt;
 $(CXX) $(CXXFLAGS) $(INCLUDE) -c $&amp;lt;&lt;/p&gt;
&lt;p&gt;$(TARGET): $(OBJS)&lt;br /&gt;
 $(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS)&lt;br /&gt;
 cp $(TARGET) $(DEST)&lt;/p&gt;
&lt;p&gt;clean:&lt;br /&gt;
 $(RM) $(TARGET) $(OBJS)&lt;br /&gt;
 $(RM) $(DEST)/$(TARGET)&lt;br /&gt;
 &lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;■上位のMakefile&lt;/p&gt;
&lt;table cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; width=&quot;394&quot; border=&quot;1&quot; style=&quot;height:376px;width:394px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;p&gt;#!/bin/make&lt;br /&gt;
MAKE = make --no-print-directory&lt;/p&gt;
&lt;p&gt;SUBDIR = $(shell find ./*/src/ -type d)&lt;/p&gt;
&lt;p&gt;all:&lt;br /&gt;
 list=&#039;$(SUBDIR)&#039;; for subdir in $    </description>
    <dc:date>2013-10-22T00:36:50+09:00</dc:date>
    <utime>1382369810</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/20.html">
    <title>Makefile</title>
    <link>https://w.atwiki.jp/toyoken/pages/20.html</link>
    <description>
      ■ソースと同階層のMakefile
#!/bin/make 

TARGET   = Sample01
SRCS     = $(shell ls *.cpp)
OBJS     = $(SRCS:.cpp=.o)
CXX      = g++
CXXFLAGS = -g -O2 -Wall
LDFLAGS  = -lm -lrt -L/Develop/lib -lCmnFunc
INCLUDE  = -I../inc -I../../CmnInc
DEST     = ../../../bin

.cpp.o:
	$(CXX) $(CXXFLAGS) $(INCLUDE) -c $&lt;

$(TARGET): $(OBJS)
	$(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS)
	cp $(TARGET) $(DEST) 

clean:
	$(RM) $(TARGET) $(OBJS)
	$(RM) $(DEST)/$(TARGET)

◆ライブラリのmakefile
#!/bin/make 

TARGET   = libCmnFunc.so
SRCS     = $(shell ls *.cpp)
OBJS     = $(SRCS:.cpp=.o)
CXX      = g++
CXXFLAGS = -g -O2 -Wall -fPIC
LDFLAGS  = -lm -lrt -shared -Wl
INCLUDE  = -I../../CmnInc
DEST     = /Develop/lib/

.cpp.o:
	$(CXX) $(CXXFLAGS) $(INCLUDE) -c $(SRCS) 

$(TARGET): $(OBJS)
	$(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS)
	cp $(TARGET) $(DEST)

clean:
	$(RM) $(TARGET) $(OBJS)

■上位階層のMakefile
#!/bin/make
MAKE = make --no-print-directory

SUBDIR = $(shell find ./*/src/ -type d)

a    </description>
    <dc:date>2014-07-27T01:24:36+09:00</dc:date>
    <utime>1406391876</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/19.html">
    <title>svn</title>
    <link>https://w.atwiki.jp/toyoken/pages/19.html</link>
    <description>
      SVN：Subversion

◆バージョン確認
&gt;svn --version

◆チェックアウト
&gt;svn co（パス）

◆アップデート
&gt;svn update

◆コミット
&gt;svn commit
&gt;svn commit -m &quot;コメント&quot;　コメントを付けてコミット

◆差分
&gt;svn diff（パス）

◆ファイルの追加
&gt;svn add（パス）

◆ファイルの削除
&gt;svn delete（パス）

◆ステータス表示
&gt;svn st
&gt;svn status

◆編集の取り消し
&gt;svn revert（パス）

◆ログ
&gt;svn log
&gt;svn log（ファイル名）

◆クリーンアップ
&gt;svn cleanup（パス）    </description>
    <dc:date>2013-10-13T04:04:41+09:00</dc:date>
    <utime>1381604681</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/18.html">
    <title>gdb</title>
    <link>https://w.atwiki.jp/toyoken/pages/18.html</link>
    <description>
      ◆事前準備
「-g」オプションを付けてコンパイルすると、gdbでデバッグ可能となります。
&gt;gcc -g（ソースファイル）

◆デバッグファイル指定
&gt;gdb （実行ファイル名）

◆プロセスID指定でデバッグ
&gt;gdb -p（プロセスID）
&gt;sudo gdb -p（プロセスID）

◆デバッグを終了
&gt;q

◆ブレークポイントを貼る
&gt;b（関数名）
&gt;b（行数）
&gt;b（ファイル名）:（行数）

◆ブレークポイントを削除する
&gt;delete

◆実行ファイルを実行
&gt;r

◆デバッグ
&gt;n　次の行へ進む（Next）
&gt;s　関数の中へ入る（Step In）
&gt;c　継続（continue）
&gt;finish　関数の最後まで実行

◆表示
&gt;p（変数名）　変数データを表示
&gt;p *（ポインタ）　ポインタが示すデータを表示
&gt;list　ソースを表示

◆設定
&gt;set（変数）=（値）

◆coreファイルを利用
&gt;gdb（実行ファイル）（coreファイル）

◆関数のコールスタックを表示
&gt;bt

◆ヘルプ
&gt;help（コマンド名）    </description>
    <dc:date>2013-12-14T11:59:49+09:00</dc:date>
    <utime>1386989989</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/toyoken/pages/17.html">
    <title>Linuxコマンド</title>
    <link>https://w.atwiki.jp/toyoken/pages/17.html</link>
    <description>
      よく使うコマンドを列挙

|ファイルを表示|ls|
|ファイルを検索|find|
|ファイルを圧縮・解凍|tar|
|ファイルのアクセス権を変更|chmod|
|ファイルの所有者を変更|chown|
|ファイルをコピー|cp|
|リモートコピー|scp|
|ファイル移動|mv|
|ファイル名を変更|rename|
|ファイルの数を数える|wc|
|ファイルサイズを表示|du|
|現在のパスを表示|pwd|
|文字列の編集|Perl|

◆ファイルの表示（ls）
&gt;ls -la　全ファイルを詳細表示
&gt;ls -lrt　ファイルをタイムスタンプ順に詳細表示
&gt;ls -lR　サブディレクトリを含めた詳細表示
|[a]|すべてのファイル|
|[l]|ファイルの詳細|
|[r]|逆順にソート|
|[t]|タイムスタンプ順|
|[R]|ディレクトリ内を再帰的に|
&gt;【ファイル表示の詳細解説】
&gt;①　　　　 ②  ③　④　  ⑤          ⑥　 　 ⑦
&gt;drwxr-xr-x   3 toyo  staff  102  8 24 00:54 test.txt
&gt;drwxr-xr-x   5 toyo  staff  170  7   4 01:30 myShell
&gt;①権限、②リンク、③ユーザ、④グループ、⑤ファイルサイズ、⑥タイムスタンプ、⑦ファイル名

◆ファイルを検索（find）
&gt;find -name (ファイル名)　ファイル名で検索
&gt;find -name &amp;u(){text.txt}
|[name]|ファイル名を指定（*も使用可）|

◆ファイルを圧縮・解凍（tar）
&gt;tar cvf（固めた後のファイル名）（固める前のファイル名）　ファイルを固める
&gt;tar cvf  test.tar  test
&gt;tar xvf（ファイル名）　ファイルを展開
&gt;tar jcvf（ファイル名）　ファイルを圧縮（bzip2形式）
&gt;tar jxvf（ファイル名）　ファイルを展開（bzip2形式）
&gt;tar tvf（ファイル名）　ファイルを表示
|[c]|固める|
|[v]|詳細表示|
|[x]|展開する|
|[f]|ファイル名指定|
|[j]|bzip2形式|
|[t]|表示する|    </description>
    <dc:date>2013-10-13T04:21:03+09:00</dc:date>
    <utime>1381605663</utime>
  </item>
  </rdf:RDF>
