916件ヒット
[1-100件を表示]
(0.102秒)
ライブラリ
- ビルトイン (156)
- benchmark (36)
- fileutils (12)
- matrix (12)
- mkmf (12)
- pty (48)
- rake (12)
- readline (12)
-
rexml
/ document (84) -
rexml
/ sax2listener (24) -
rexml
/ streamlistener (36) -
rubygems
/ config _ file (24) -
rubygems
/ defaults (12) - shell (60)
-
shell
/ command-processor (66) -
shell
/ filter (18) -
shell
/ system-command (102) - syslog (36)
- timeout (21)
- win32ole (12)
クラス
- Dir (72)
-
Gem
:: ConfigFile (24) - Matrix (12)
-
RDoc
:: Options (12) -
REXML
:: DocType (36) -
REXML
:: NotationDecl (36) - Shell (60)
-
Shell
:: CommandProcessor (66) -
Shell
:: Filter (18) -
Shell
:: SystemCommand (96) - WIN32OLE (12)
モジュール
- Benchmark (36)
- FileUtils (24)
- Gem (12)
- Kernel (96)
- PTY (48)
-
REXML
:: SAX2Listener (24) -
REXML
:: StreamListener (36) - Readline (12)
- Syslog (24)
- Timeout (21)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
LOCALE
_ SYSTEM _ DEFAULT (12) -
NEWS for Ruby 2
. 6 . 0 (7) - NotationDecl (12)
-
OPERATING
_ SYSTEM _ DEFAULTS (12) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
-
SYSTEM
_ WIDE _ CONFIG _ FILE (12) - Syslog (12)
- SystemCommand (6)
- Win32ネイティブ版Rubyの互換性問題 (12)
- ` (12)
- active? (6)
-
alias
_ command (6) - benchmark (12)
- bm (12)
- bmbm (12)
- cat (6)
- command (6)
-
def
_ system _ command (12) -
default
_ system _ path (6) -
default
_ system _ path= (6) -
default
_ system _ source _ cache _ dir (12) - doctype (24)
- each (6)
- echo (6)
- eigensystem (12)
- entitydecl (12)
- entries (12)
- exec (24)
-
external
_ id (12) -
find
_ system _ command (18) - flush (6)
- foreach (24)
- getpty (24)
- glob (6)
- input= (6)
-
install
_ system _ commands (12) - kill (6)
- name (6)
- new (30)
- notationdecl (24)
- notify (12)
-
op
_ dir (12) - open (24)
- open! (12)
- out (18)
- public (12)
- rake (12)
- rdoc (12)
- readline (12)
- reopen (12)
-
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - sh (12)
-
shell
/ system-command (6) - spawn (48)
- start (6)
-
start
_ export (6) -
start
_ import (6) -
super
_ each (6) - system= (12)
- tee (6)
- terminate (6)
- timeout (21)
- transact (6)
-
unalias
_ command (6) -
undef
_ system _ command (12) - uptodate? (12)
- wait? (6)
- xsystem (12)
- 環境変数 (12)
検索結果
先頭5件
-
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (21319.0) -
command を実行する.
...nd を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.d......ef_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
REXML
:: DocType # system -> String | nil (21119.0) -
DTD のシステム識別子を返します。
...DTD のシステム識別子を返します。
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-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 #... -
REXML
:: NotationDecl # system -> String | nil (21101.0) -
システム識別子(URI)を返します。
システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。 -
Shell
# system(command , *opts) -> Shell :: SystemCommand (18319.0) -
command を実行する.
...nd を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.d......ef_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18319.0) -
command を実行する.
...nd を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.d......ef_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Kernel
. # system(command , options={}) -> bool | nil (18236.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......by]{
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 wit......h 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 (18236.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指定......by]{
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 wit......h exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception: true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(command , options={}) -> bool | nil (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@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 (18218.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@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)... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (12223.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 (12220.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...require 'shell'
p Shell.default_system_path
# 例
#=> [ "/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/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/... -
Shell
. default _ system _ path=(path) (12220.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...require 'shell'
p Shell.default_system_path
# 例
#=> [ "/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/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/... -
Shell
. def _ system _ command(command , path = command) -> nil (12219.0) -
Shell のメソッドとして command を登録します.
...のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる 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_s... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (12213.0) -
commandを削除します.
...commandを削除します.
@param command 削除するコマンドの文字列を指定します。
動作例:
require 'shell'
Shell.def_system_command("ls")
# ls を定義
Shell.undef_system_command("ls")
# ls を 削除
sh = Shell.new
begin
sh.transact {
ls("-l").each......{|l|
puts l
}
}
rescue NameError => err
puts err
end... -
Gem
:: ConfigFile :: OPERATING _ SYSTEM _ DEFAULTS -> {} (12207.0) -
Ruby をパッケージングしている人がデフォルトの設定値をセットするために使用します。
...Ruby をパッケージングしている人がデフォルトの設定値をセットするために使用します。
使用するファイルは rubygems/defaults/operating_system.rb です。...