ライブラリ
- ビルトイン (286)
- benchmark (77)
- fileutils (11)
- matrix (11)
- mkmf (11)
- pty (22)
- rake (22)
- readline (11)
-
rexml
/ document (77) -
rexml
/ sax2listener (22) -
rexml
/ streamlistener (33) -
rubygems
/ config _ file (22) -
rubygems
/ defaults (11) -
rubygems
/ source _ info _ cache (44) - shell (84)
-
shell
/ command-processor (60) -
shell
/ filter (78) -
shell
/ system-command (72) - syslog (22)
- timeout (19)
-
win32
/ resolv (11) - win32ole (33)
- zlib (11)
クラス
-
Benchmark
:: Tms (44) - Dir (66)
-
File
:: Stat (11) -
Gem
:: ConfigFile (22) -
Gem
:: SourceInfoCache (44) - Matrix (11)
-
REXML
:: DocType (33) -
REXML
:: Entity (11) -
REXML
:: NotationDecl (22) -
Rake
:: Application (11) - Shell (84)
-
Shell
:: CommandProcessor (60) -
Shell
:: Filter (78) -
Shell
:: SystemCommand (72) - SystemCallError (55)
- SystemExit (11)
- WIN32OLE (22)
-
WIN32OLE
_ TYPELIB (11) -
Win32
:: Resolv (11)
モジュール
キーワード
- < (6)
- === (11)
- >> (6)
- Entity (11)
-
LOCALE
_ SYSTEM _ DEFAULT (11) -
OPERATING
_ SYSTEM _ DEFAULTS (11) -
OS
_ ZSYSTEM (11) -
SYSTEM
_ WIDE _ CONFIG _ FILE (11) - ` (11)
- active? (6)
-
alias
_ command (6) - application= (11)
- benchmark (11)
- bm (11)
- cat (18)
- command (6)
- cstime (11)
-
def
_ system _ command (12) -
default
_ system _ path (6) -
default
_ system _ source _ cache _ dir (11) - doctype (22)
- echo (18)
- eigensystem (11)
- entitydecl (11)
- entries (11)
- errno (11)
- exec (44)
- external (11)
-
external
_ id (11) - flush (6)
- foreach (22)
- format (11)
-
get
_ hosts _ path (11) - getpty (11)
- glob (18)
-
install
_ system _ commands (12) - kill (6)
-
latest
_ system _ cache _ file (22) - locale (11)
- measure (11)
- name (6)
- new (77)
- notationdecl (22)
- notify (12)
- open (22)
- open! (11)
- out (18)
- pipe? (11)
- public (11)
- readline (11)
- reopen (11)
-
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
rexml
/ parsers / ultralightparser (11) - spawn (55)
- start (6)
-
start
_ import (6) - stime (11)
- success? (11)
-
super
_ each (6) -
system
_ cache _ file (22) -
system
_ path (6) - tee (18)
- terminate (6)
- timeout (19)
-
to
_ a (6) -
to
_ s (6) - transact (18)
-
unalias
_ command (6) -
undef
_ system _ command (12) - uptodate? (11)
- wait? (6)
- xsystem (11)
- | (6)
検索結果
先頭5件
-
Shell
# system(command , *opts) -> Shell :: SystemCommand (21437.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (21437.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (21437.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Kernel
. # system(command , options={}) -> bool | nil (21436.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます......を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます......//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"',... -
Kernel
. # system(env , command , options={}) -> bool | nil (21436.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます......を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます......//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
//emlist[exceptionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"',... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (21421.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (21421.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
options で :exception に true を指定することで、
nil や false を返す代わりに例外を発生するようにできます......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(command , options={}) -> bool | nil (21418.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...で終了すると成功とみなし true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行するこ......を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます......文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (21418.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...で終了すると成功とみなし true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行するこ......を参照することで判別可能です。
=== 引数の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます......文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (21418.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...で終了すると成功とみなし true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行するこ......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (21418.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...で終了すると成功とみなし true を返します。
それ以外の終了ステータスの場合は false を返します。
コマンドを実行できなかった場合は nil を返します。
終了ステータスは変数 $? で参照できます。
コマンドを実行するこ......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
REXML
:: DocType # system -> String | nil (21319.0) -
DTD のシステム識別子を返します。
...nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-str......ict.dtd"
doctype.public # => "-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}... -
REXML
:: NotationDecl # system -> String | nil (21301.0) -
システム識別子(URI)を返します。
...システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。... -
Shell
:: Filter # >(to) -> self (21218.0) -
toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。
...ルに,IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/etc/passwd") > "tail.out" # と同じ.
}... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (15347.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
...
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5......のような例。
require 'shell'
Shell.install_system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}... -
Gem
:: ConfigFile :: SYSTEM _ WIDE _ CONFIG _ FILE -> String (15301.0) -
システム全体の設定ファイルのパスです。
システム全体の設定ファイルのパスです。