別のキーワード
種類
- モジュール関数 (309)
- インスタンスメソッド (300)
- 特異メソッド (246)
ライブラリ
- ビルトイン (312)
- benchmark (60)
- fileutils (12)
- mkmf (12)
- pty (48)
- rake (24)
- readline (12)
-
rexml
/ document (24) -
rexml
/ sax2listener (24) -
rexml
/ streamlistener (36) - shell (90)
-
shell
/ command-processor (54) -
shell
/ filter (60) -
shell
/ system-command (30) - syslog (24)
- timeout (21)
- win32ole (12)
クラス
-
Benchmark
:: Tms (24) - Dir (72)
- IO (12)
-
REXML
:: NotationDecl (24) - Shell (90)
-
Shell
:: CommandProcessor (54) -
Shell
:: Filter (60) -
Shell
:: SystemCommand (30) - String (12)
- SystemCallError (48)
- SystemExit (12)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Benchmark (36)
- FileUtils (24)
- Kernel (168)
- PTY (48)
-
REXML
:: SAX2Listener (24) -
REXML
:: StreamListener (36) - Rake (12)
- Readline (12)
- Syslog (24)
- Timeout (21)
キーワード
- < (6)
- === (12)
- > (6)
- >> (6)
- ` (12)
-
alias
_ command (6) - application= (12)
- benchmark (12)
- bm (12)
- bmbm (12)
- cat (18)
-
close
_ on _ exec= (12) -
def
_ system _ command (12) -
default
_ system _ path (6) -
default
_ system _ path= (6) - doctype (24)
- each (6)
- echo (18)
- entitydecl (12)
- entries (12)
- exec (48)
- foreach (24)
- format (12)
- getpty (24)
- glob (18)
-
install
_ system _ commands (12) - kill (6)
- new (102)
- notationdecl (24)
- notify (12)
- open (24)
- open! (12)
- out (18)
- readline (12)
- reopen (12)
- sh (12)
- spawn (72)
- sum (12)
- system= (12)
-
system
_ path (6) -
system
_ path= (6) - tee (18)
- timeout (21)
-
unalias
_ command (6) -
undef
_ system _ command (12) - uptodate? (12)
- xsystem (12)
- | (6)
検索結果
先頭5件
-
Shell
# system(command , *opts) -> Shell :: SystemCommand (18231.0) -
command を実行する.
...る.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_comma......nd("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (18231.0) -
command を実行する.
...る.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_comma......nd("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18231.0) -
command を実行する.
...る.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_comma......nd("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Kernel
. # system(command , options={}) -> bool | nil (18158.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...れます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX exception: true が指......ル経由でコマンドを実行][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 (18158.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...れます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise Errno::EXXX exception: true が指......ル経由でコマンドを実行][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 (18148.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列です。
@param args program に渡す引数を 0 個以上指定する
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError......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 (18148.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列です。
@param args program に渡す引数を 0 個以上指定する
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError......se RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18145.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列です。
@param args program に渡す引数を 0 個以上指定する
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError......第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (18145.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...指定しなくても環境変数 PATH から探します。
@param program 文字列か2要素の配列です。
@param args program に渡す引数を 0 個以上指定する
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
@raise ArgumentError......第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(command , options={}) -> bool | nil (18140.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ら直接実行されます。
@param command command コマンドを文字列で指定します。
@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 (18140.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...ら直接実行されます。
@param command command コマンドを文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB......fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
# xsystem(command , opts = nil) -> () (6134.0) -
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
...Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。......:werror というキーに真を指定すると
@see Kernel.#system... -
Shell
. def _ system _ command(command , path = command) -> nil (6131.0) -
Shell のメソッドとして command を登録します.
...ます.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッドとして定義するコマンドを文字列で指定します。
@param path command のパスを指定します。
指定しない場......合はcommand と同じになります。
例)
require 'shell'
Shell.def_system_command "ls"
# ls を定義
Shell.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義
sh = Shell.new
sh.transact {
ls.each { |l|
puts l
}
(ls("-l") | sys_... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (6129.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
}
}... -
Shell
. default _ system _ path -> Array (6126.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...索する対象のパスを設定および、参照します。
@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。
動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [ "/opt/local/bin", "/opt/local/sbin", "/usr/bi......n", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"... -
Shell
. default _ system _ path=(path) (6126.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...索する対象のパスを設定および、参照します。
@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。
動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [ "/opt/local/bin", "/opt/local/sbin", "/usr/bi......n", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"...