Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:wantto18 [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:wantto18

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:root:wantto18 [2018/09/29 08:25]
kota
ja:root:wantto18 [2018/09/29 08:42] (現在)
kota
ライン 19: ライン 19:
   root '​test.C(10,"​aho"​)'​   root '​test.C(10,"​aho"​)'​
   ​   ​
 +  ### shell 変数を使う場合
   N=10;   N=10;
   str="​aho";​   str="​aho";​
-  root '​test.C('​$N',​ "'​$str'"​)'​+  root '​test.C('​${N}', "'​${str}'"​)'​ 
 +</​code>​ 
 +のようにシングルクオートでエスケープが必要。
  
 +rootの対話型ターミナルでなら
 +<code cpp>
 +  .x test.C(10,"​aho"​)
 </​code>​ </​code>​
 +でも実行できる。
 +
 +ほか、\\
 +test1.sh
 +<code bash>
 +#!/bin/bash
 +root << EOF
 +.x test.C(10,"​aho"​);​
 +.q;
 +EOF
 +</​code>​
 +
 +とか\\
 +test2.sh
 +<code bash>
 +#!/bin/bash
 +N=10
 +str=\"​aho\"​
 +root << EOF
 +.x test.C(${N},​${str});​
 +.q;
 +EOF
 +</​code>​
 +
 +などでも実行可能
ja/root/wantto18.1538209542.txt.gz · 最終更新: 2018/09/29 08:25 by kota