るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.028秒)
トップページ > クエリ:command[x] > モジュール:FileUtils[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

ライブラリ

キーワード

検索結果

FileUtils.commands -> Array (6101.0)

何らかのオプションを持つメソッド名の配列を返します。

...何らかのオプションを持つメソッド名の配列を返します。

//emlist[][ruby]{
require 'fileutils'
FileUtils
.commands # => ["chmod", "cp", "cp_r", "install", ...]
//}...

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

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

...しては Kernel.#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 Kerne...