タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

rubyとshellに関するpugleeのブックマーク (1)

  • library shell (Ruby 2.0.0)

    要約 Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。 sh/csh の制御文は Ruby の機能を用いて実現します。 サンプル Example 1: 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?(dir) sh.mkdir dir sh.cd(dir) do f = sh.open("tmpFile", "w") f.puts "TEST" f.close end print sh.pwd end end Example 2: sh = Shell.cd("/tmp")

    puglee
    puglee 2014/11/26
    Ruby から外部コマンドを実行するためのライブラリ.
  • 1