4件ヒット
[1-4件を表示]
(0.305秒)
種類
- 特異メソッド (3)
- インスタンスメソッド (1)
ライブラリ
- shell (1)
-
shell
/ command-processor (3)
クラス
- Shell (1)
-
Shell
:: CommandProcessor (3)
キーワード
- system (1)
-
undef
_ system _ command (2)
検索結果
先頭4件
-
Shell
:: CommandProcessor . def _ system _ command(command , path = command) -> () (81604.0) -
@todo
@todo
与えられたコマンドをメソッドとして定義します。
@param command 定義したいコマンドを指定します。
@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。 -
Shell
:: CommandProcessor . undef _ system _ command(command) -> self (45601.0) -
与えられたコマンドを削除します。
与えられたコマンドを削除します。
@param command 削除したいコマンド名を指定します。 -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (36919.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 ... -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (27619.0) -
command を実行する.
command を実行する.
@param 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