5件ヒット
[1-5件を表示]
(0.120秒)
ライブラリ
- pstore (1)
- shell (1)
-
shell
/ command-processor (1) -
shell
/ filter (2)
クラス
- PStore (1)
- Shell (1)
-
Shell
:: CommandProcessor (1) -
Shell
:: Filter (2)
キーワード
- transaction (1)
- | (1)
検索結果
先頭5件
-
Shell
# transact { . . . } -> object (54646.0) -
ブロック中で shell を self として実行します。
ブロック中で shell を self として実行します。
例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
} -
Shell
:: CommandProcessor # transact { . . . } -> object (54646.0) -
ブロック中で shell を self として実行します。
ブロック中で shell を self として実行します。
例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
} -
Shell
:: Filter # transact { . . . } -> object (54646.0) -
ブロック中で shell を self として実行します。
ブロック中で shell を self として実行します。
例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
} -
PStore
# transaction(read _ only = false) {|pstore| . . . } -> object (18607.0) -
トランザクションに入ります。 このブロックの中でのみデータベースの読み書きができます。
トランザクションに入ります。
このブロックの中でのみデータベースの読み書きができます。
読み込み専用のトランザクションが使用可能です。
@param read_only 真を指定すると、読み込み専用のトランザクションになります。
@return ブロックで最後に評価した値を返します。
@raise PStore::Error read_only を真にしたときに、データベースを変更しようした場合に発生します。
例:
require 'pstore'
db = PStore.new("/tmp/foo")
db.transaction do
p db.roots... -
Shell
:: Filter # |(filter) -> object (325.0) -
パイプ結合を filter に対して行います。
パイプ結合を filter に対して行います。
@param filter Shell::Filter オブジェクトを指定します。
@return filter を返します。
使用例
require 'shell'
Shell.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc(...