るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.011秒)
トップページ > バージョン:2.3.0[x] > クエリ:Dir[x] > クエリ:shell[x] > 種類:ライブラリ[x]

別のキーワード

  1. dir chdir
  2. dir open
  3. dir foreach
  4. dir each_child
  5. rake original_dir

検索結果

shell (114508.0)

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。

sh/csh の制御文は Ruby の機能を用いて実現します。

=== サンプル

==== Example 1:

require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-1" unless sh.exists?("shell-test-1")
sh.cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
unless sh.exists?(...