ライブラリ
- ビルトイン (363)
- benchmark (121)
- fileutils (11)
- matrix (11)
- mkmf (11)
-
net
/ ftp (11) - pty (44)
- rake (33)
- readline (11)
- resolv (11)
-
rexml
/ document (99) -
rexml
/ sax2listener (22) -
rexml
/ streamlistener (33) -
rubygems
/ config _ file (22) -
rubygems
/ defaults (11) -
rubygems
/ exceptions (11) -
rubygems
/ source _ info _ cache (44) - shell (102)
-
shell
/ command-processor (66) -
shell
/ filter (84) -
shell
/ system-command (102) - socket (66)
- syslog (33)
- timeout (19)
-
win32
/ resolv (11) - win32ole (33)
- zlib (11)
クラス
-
Benchmark
:: Tms (66) - Dir (66)
-
File
:: Stat (11) -
Gem
:: ConfigFile (22) -
Gem
:: SourceInfoCache (44) - IO (11)
- Matrix (11)
-
Net
:: FTP (11) -
RDoc
:: Options (11) -
REXML
:: DocType (33) -
REXML
:: Entity (11) -
REXML
:: NotationDecl (33) -
Rake
:: Application (11) - Shell (102)
-
Shell
:: CommandProcessor (66) -
Shell
:: Filter (84) -
Shell
:: SystemCommand (96) - Socket (33)
- String (11)
- SystemCallError (55)
- SystemExit (33)
- WIN32OLE (22)
-
WIN32OLE
_ TYPELIB (11) -
Win32
:: Resolv (11)
モジュール
- Benchmark (55)
- FileUtils (22)
- Gem (11)
- Kernel (154)
- PTY (44)
-
REXML
:: SAX2Listener (22) -
REXML
:: StreamListener (33) - Rake (11)
- Readline (11)
-
Socket
:: Constants (33) - Syslog (22)
- Timeout (19)
- Zlib (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - < (6)
- === (11)
- > (6)
- >> (6)
-
AF
_ SYSTEM (22) -
EAI
_ SYSTEM (22) - Entity (11)
- FORMAT (22)
- Hosts (11)
-
LOCALE
_ SYSTEM _ DEFAULT (11) - Mac OS X (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (6) - NotationDecl (11)
-
OPERATING
_ SYSTEM _ DEFAULTS (11) -
OS
_ ZSYSTEM (11) -
PF
_ SYSTEM (22) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
-
SYSTEM
_ WIDE _ CONFIG _ FILE (11) - Syslog (11)
- SystemCallError (11)
- SystemCommand (6)
- SystemExit (11)
- SystemExitException (11)
- SystemStackError (11)
- Win32ネイティブ版Rubyの互換性問題 (11)
- ` (11)
- active? (6)
-
alias
_ command (6) - application= (11)
- benchmark (11)
- bm (11)
- bmbm (11)
- cat (18)
-
close
_ on _ exec= (11) - command (6)
- cstime (11)
-
def
_ system _ command (12) -
default
_ system _ path (6) -
default
_ system _ path= (6) -
default
_ system _ source _ cache _ dir (11) - doctype (22)
- each (6)
- echo (18)
- eigensystem (11)
- entitydecl (11)
- entries (11)
- errno (11)
- exec (44)
- external (11)
-
external
_ id (11) -
find
_ system _ command (18) - flush (6)
- foreach (22)
- format (11)
-
get
_ hosts _ path (11) - getpty (22)
- glob (18)
- input= (6)
-
install
_ system _ commands (12) - kill (6)
-
latest
_ system _ cache _ file (22) - locale (11)
- measure (11)
- name (6)
- new (94)
- notationdecl (22)
- notify (12)
-
op
_ dir (11) - open (22)
- open! (11)
- out (18)
- pipe? (11)
- public (11)
- rake (11)
- rdoc (11)
- readline (11)
- reopen (11)
-
rexml
/ parsers / pullparser (11) -
rexml
/ parsers / sax2parser (11) -
rexml
/ parsers / streamparser (11) -
rexml
/ parsers / ultralightparser (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - sh (11)
-
shell
/ system-command (6) - spawn (66)
- start (6)
-
start
_ export (6) -
start
_ import (6) - status (11)
- stime (11)
- success? (11)
- sum (11)
-
super
_ each (6) - system= (11)
-
system
_ cache _ file (22) -
system
_ path (6) -
system
_ path= (6) - tee (18)
- terminate (6)
- timeout (19)
-
to
_ a (17) -
to
_ s (6) - transact (18)
- tsort (11)
-
unalias
_ command (6) -
undef
_ system _ command (12) - uptodate? (11)
- wait? (6)
- xsystem (11)
- | (6)
- セキュリティモデル (11)
- 環境変数 (11)
検索結果
先頭5件
-
Shell
# system(command , *opts) -> Shell :: SystemCommand (18219.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 (18219.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 (18219.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 (18136.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ル経由でコマンドを実行][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)"', exception: true)......# => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18136.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ル経由でコマンドを実行][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)"', exception: true)......# => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18121.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...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 (18121.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
REXML
:: DocType # system -> String | nil (18119.0) -
DTD のシステム識別子を返します。
...html1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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
//... -
Kernel
. # system(command , options={}) -> bool | nil (18118.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@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 (18118.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@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 (18118.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...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 (18118.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Net
:: FTP # system -> String (18101.0) -
サーバーの OS のタイプを返します。
サーバーの OS のタイプを返します。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外でエラーである場合に発生します。 -
REXML
:: NotationDecl # system -> String | nil (18101.0) -
システム識別子(URI)を返します。
システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。 -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (6123.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
}
}...