Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > shell/filterライブラリ > Shell::Filterクラス > system
system(command, *opts) -> Shell::SystemCommand[permalink][rdoc]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