30件ヒット
[1-30件を表示]
(0.123秒)
種類
- インスタンスメソッド (24)
- 特異メソッド (6)
ライブラリ
- shell (30)
キーワード
- [] (6)
- append (6)
- mkdir (6)
- test (6)
-
unalias
_ command (6)
検索結果
先頭5件
-
Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (6501.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
. unalias _ command(alias) -> () (6207.0) -
commandのaliasを削除します.
...commandのaliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError alias で指定したコマンドが無い場合に発生します。
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_co......ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}
Shell.unalias_command("lsla")
begin
Shell.unalias_command("lsla")
rescue NameError => err
puts err
end... -
Shell
# mkdir(*path) -> Array (6107.0) -
Dir.mkdirと同じです。 (複数可)
...Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=>......["foo"]
rescue => err
puts err
end... -
Shell
# [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (407.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...st や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文......@param file2 文字列でファイルへのパスを指定します。
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
@see Kernel.#test, FileTest... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (407.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...st や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文......@param file2 文字列でファイルへのパスを指定します。
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
@see Kernel.#test, FileTest...