るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. ftp ls
  2. net/ftp ls
  3. ls
  4. ls net/ftp
  5. ls net::ftp

ライブラリ

モジュール

検索結果

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

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

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

与えられた引数が複数の場合、シェルを経由しないでコマンドを実行します。

@param cmd 引数の解釈に関しては 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 = #...