るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.095秒)

別のキーワード

  1. util u
  2. matrix u
  3. erb u
  4. _builtin koi8_u
  5. lupdecomposition u

ライブラリ

クラス

モジュール

検索結果

Process::Status#exitstatus -> Integer | nil (27202.0)

exited? が真の場合プロセスが返した終了ステータスの整数を、そ うでない場合は nil を返します。

exited? が真の場合プロセスが返した終了ステータスの整数を、そ
うでない場合は nil を返します。

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

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

...参照してください。


例:
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, Kernel.#system...