るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.006秒)
トップページ > クエリ:exec[x] > モジュール:FileUtils[x]

別のキーワード

  1. _builtin exec
  2. kernel exec
  3. rubygems/defaults default_exec_format
  4. process exec
  5. io close_on_exec=

ライブラリ

検索結果

FileUtils#sh(*cmd) {|result, status| ... } (13.0)

与えられたコマンドを実行します。

...rnel.#exec を参照してください。


例:
sh %{ls -ltr}

sh 'ls', 'file with spaces'

# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end

@see Kernel.#exec, Ker...