918件ヒット
[1-100件を表示]
(0.103秒)
ライブラリ
- ビルトイン (144)
-
drb
/ extservm (12) - shell (84)
-
shell
/ builtin-command (18) -
shell
/ command-processor (390) -
shell
/ error (6) -
shell
/ filter (96) -
shell
/ process-controller (30) -
shell
/ system-command (102)
クラス
-
DRb
:: ExtServManager (12) - Shell (84)
-
Shell
:: BuiltInCommand (12) -
Shell
:: CommandProcessor (390) -
Shell
:: Filter (96) -
Shell
:: ProcessController (30) -
Shell
:: SystemCommand (96)
モジュール
- Kernel (144)
キーワード
- < (6)
- > (6)
- >> (6)
- BuiltInCommand (6)
- CommandNotFound (6)
- NoDelegateMethods (6)
- SystemCommand (6)
- [] (18)
- active? (12)
-
add
_ delegate _ command _ to _ shell (6) -
add
_ schedule (6) -
alias
_ command (18) - append (6)
- atime (6)
- basename (6)
- cat (18)
-
check
_ point (6) - chmod (6)
- chown (6)
- concat (6)
- ctime (6)
-
def
_ builtin _ commands (6) -
def
_ system _ command (12) - delete (6)
- directory? (6)
- dirname (6)
- each (6)
- echo (18)
- exec (48)
- executable? (6)
-
executable
_ real? (6) - exist? (6)
- exists? (6)
-
find
_ system _ command (18) -
finish
_ all _ jobs (6) - flush (6)
- foreach (6)
- ftype (6)
- glob (18)
- identical? (6)
- initialize (6)
- input= (6)
-
install
_ builtin _ commands (6) -
install
_ system _ commands (12) - join (6)
- kill (6)
-
kill
_ job (6) - lstat (6)
-
method
_ added (6) - mkdir (6)
- mtime (6)
- name (6)
- new (6)
- notify (18)
- open (6)
-
optparse
/ shellwords (12) - out (18)
- readlink (6)
- rename (6)
- rm (6)
- rmdir (6)
- setgid? (6)
- setuid? (6)
- sfork (6)
-
shell
/ builtin-command (6) -
shell
/ system-command (6) - size (6)
- size? (6)
- socket? (6)
- spawn (48)
- split (6)
- start (6)
-
start
_ export (6) -
start
_ import (6) -
start
_ job (6) - stat (6)
- sticky? (6)
-
super
_ each (6) - system (66)
- tee (18)
- terminate (6)
-
terminate
_ job (6) - test (18)
-
to
_ a (6) -
to
_ s (6) - transact (18)
- truncate (6)
-
undef
_ system _ command (12) - unlink (6)
- utime (6)
- wait? (12)
-
win32
/ registry (12) -
world
_ writable? (6) - writable? (6)
-
writable
_ real? (6) - | (6)
検索結果
先頭5件
-
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (29561.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... -
Shell
. def _ system _ command(command , path = command) -> nil (29507.0) -
Shell のメソッドとして command を登録します.
...
Shell のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッド......path command のパスを指定します。
指定しない場合はcommand と同じになります。
例)
require 'shell'
Shell.def_system_command "ls"
# ls を定義
Shell.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義
sh = Shell.ne......w
sh.transact {
ls.each { |l|
puts l
}
(ls("-l") | sys_sort("-k 5")).each {|l|
puts l
}
}... -
Shell
# find _ system _ command(command) (29302.0) -
@todo
...@todo... -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (29240.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
:: SystemCommand # command -> String (27201.0) -
@todo
...@todo
コマンド名を返します。... -
Shell
:: CommandProcessor . add _ delegate _ command _ to _ shell(id) (24308.0) -
@todo
...@todo
Shell 自体を初期化する時に呼び出されるメソッドです。
ユーザが使用することはありません。
@param id メソッド名を指定します。... -
Shell
# system(command , *opts) -> Shell :: SystemCommand (23560.0) -
command を実行する.
...
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
S......hell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (23394.0) -
コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
...す。
コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
@param alias エイリアスの名前を文字列で指定します.
@param command コマンド名を文字列で指定します.
@param opts command で指定したコマンドのオプシ......を指定します.
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}... -
Shell
# tee(file) -> Shell :: Filter (23325.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...lter オブジェクトを返します.
@param file シェルコマンドtee に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat......(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# cat(*files) -> Shell :: Filter (23225.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...を内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|......file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# out(dev = STDOUT , &block) -> () (23140.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.......new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
}... -
Shell
# transact { . . . } -> object (23140.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 と同じとなる。
}... -
DRb
:: ExtServManager . command -> { String => String|[String] } (21419.0) -
サービスを起動するためのコマンドを指定するための Hash を 返します。
...ます。
DRb::ExtServManager.command= で Hash 自体を
変更することでも同じことができます。
コマンドは文字列、もしくは文字列の配列で指定します。
文字列で指定した場合は Kernel.#spawn で
プロセスを起動する際に shell 経由で起動......されます。
文字列の配列で指定すると shell を経由せずに起動されます。... -
Shell
:: SystemCommand # terminate -> () (21200.0) -
@todo
...@todo... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (20326.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para......'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true
@see Kernel.#test, FileTest... -
Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () (18421.0) -
@todo
...@todo
与えられたコマンドをメソッドとして定義します。
@param command 定義したいコマンドを指定します。
@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。...