636件ヒット
[1-100件を表示]
(0.069秒)
別のキーワード
ライブラリ
- ビルトイン (156)
- mkmf (12)
- pty (48)
- rake (12)
- shell (78)
-
shell
/ command-processor (66) -
shell
/ filter (84) -
shell
/ system-command (102)
クラス
- Shell (78)
-
Shell
:: CommandProcessor (66) -
Shell
:: Filter (84) -
Shell
:: SystemCommand (96)
キーワード
- < (6)
- > (6)
- >> (6)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- SystemCommand (6)
- Win32ネイティブ版Rubyの互換性問題 (12)
- ` (12)
- active? (6)
-
alias
_ command (6) - cat (18)
-
def
_ system _ command (12) - each (6)
- echo (18)
- exec (48)
-
find
_ system _ command (18) - flush (6)
- getpty (24)
- glob (18)
- input= (6)
-
install
_ system _ commands (12) - kill (6)
- name (6)
- new (6)
- notify (12)
- out (18)
- rdoc (12)
-
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - sh (12)
-
shell
/ system-command (6) - spawn (72)
- start (6)
-
start
_ export (6) -
start
_ import (6) -
super
_ each (6) - tee (18)
- terminate (6)
-
to
_ a (6) -
to
_ s (6) - transact (18)
- tsort (12)
-
unalias
_ command (6) -
undef
_ system _ command (12) - wait? (6)
- xsystem (12)
- | (6)
検索結果
先頭5件
-
Shell
:: SystemCommand # command -> String (33202.0) -
@todo
@todo
コマンド名を返します。 -
Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () (24743.0) -
@todo
...@todo
与えられたコマンドをメソッドとして定義します。
@param command 定義したいコマンドを指定します。
@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。... -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (24689.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
:: CommandProcessor . undef _ system _ command(command) -> self (24517.0) -
与えられたコマンドを削除します。
...与えられたコマンドを削除します。
@param command 削除したいコマンド名を指定します。... -
Shell
:: CommandProcessor # find _ system _ command(command) (24505.0) -
@todo
@todo -
Shell
:: CommandProcessor . install _ system _ commands(prefix = "sys _ ") -> () (24301.0) -
全てのシステムコマンドをメソッドとして定義します。
全てのシステムコマンドをメソッドとして定義します。
既に定義されているコマンドを再定義することはありません。
デフォルトでは全てのコマンドに "sys_" というプレフィクスが付きます。
また、メソッド名として使用できない文字は全て "_" に置換してメソッドを定義します。
このメソッドの実行中に発生した例外は単に無視されます。
@param prefix プレフィクスを指定します。 -
Shell
. def _ system _ command(command , path = command) -> nil (18817.0) -
Shell のメソッドとして command を登録します.
...ell のメソッドとして 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コマンドをsy... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (18785.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... -
Shell
# system(command , *opts) -> Shell :: SystemCommand (18689.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
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18689.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
# find _ system _ command(command) (18505.0) -
@todo
@todo -
Shell
:: Filter # find _ system _ command(command) (18505.0) -
@todo
@todo -
Kernel
. # system(command , options={}) -> bool | nil (18388.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指......][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 (18388.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...の解釈
この形式では command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。
@param command command コマンドを文字列で指......][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(command , options={}) -> bool | nil (18358.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 (18358.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 _ ") -> () (18323.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
}
}...