るりまサーチ

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.036秒)
トップページ > クエリ:command[x] > クエリ:SystemCommand[x] > ライブラリ:shell/command-processor[x]

別のキーワード

  1. shell/builtin-command new
  2. shell/builtin-command each
  3. rubygems/command command
  4. irb/extend-command def_extend_command
  5. irb/extend-command install_extend_commands

クラス

検索結果

Shell::CommandProcessor#system(command, *opts) -> Shell::SystemCommand (3338.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...