6件ヒット
[1-6件を表示]
(0.401秒)
検索結果
-
Shell
. def _ system _ command(command , path = command) -> nil (18338.0) -
Shell のメソッドとして command を登録します.
...ます.
@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_sort("-k 5")).each {|l|
puts l
}
}...