60件ヒット
[1-60件を表示]
(0.012秒)
種類
- インスタンスメソッド (54)
- ライブラリ (6)
ライブラリ
- shell (18)
-
shell
/ command-processor (18) -
shell
/ filter (18)
クラス
- Shell (18)
-
Shell
:: CommandProcessor (18) -
Shell
:: Filter (18)
検索結果
先頭5件
-
shell (26178.0)
-
Ruby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
...uby 上で sh/csh のようにコマンドの実行及びフィルタリングを手軽に行うためのライブラリです。
sh/csh の制御文は Ruby の機能を用いて実現します。
=== サンプル
==== Example 1:
require 'shell'
sh = Shell.cd("/tmp")
sh.mkdir "shell-test-......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:
require 'shell'
sh......= Shell.cd("/tmp")
sh.transact do
mkdir "shell-test-1" unless exists?("shell-test-1")
cd("shell-test-1")
for dir in ["dir1", "dir3", "dir5"]
if !exists?(dir)
mkdir dir
cd(dir) do
f = open("tmpFile", "w")
f.print "TEST\n"
f.close... -
Shell
# mkdir(*path) -> Array (21135.0) -
Dir.mkdirと同じです。 (複数可)
...Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>... -
Shell
:: CommandProcessor # mkdir(*path) -> Array (21135.0) -
Dir.mkdirと同じです。 (複数可)
...Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>... -
Shell
:: Filter # mkdir(*path) -> Array (21135.0) -
Dir.mkdirと同じです。 (複数可)
...Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>... -
Shell
# [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true... -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true... -
Shell
:: Filter # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true... -
Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (3048.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true...