るりまサーチ

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

別のキーワード

  1. shell/builtin-command new
  2. shell/builtin-command each
  3. etc sc_shell
  4. shell cd
  5. shell debug

キーワード

検索結果

<< 1 2 3 ... > >>

Shell::ProcessController#shell -> Shell (21203.0)

@todo

@todo

Etc::Passwd#shell -> String (18102.0)

このユーザのログインシェルを返します。

このユーザのログインシェルを返します。

Shell#append(to, filter) -> Shell::AppendFile | Shell::AppendIO (17209.0)

@todo

...@todo

@param to 文字列か IO を指定します。

@param filter Shell::Filter のインスタンスを指定します。...

Shell#system(command, *opts) -> Shell::SystemCommand (17126.0)

command を実行する.

...で指定します。

@param opts command のオプションを文字列で指定します。複数可。

使用例:

require 'shell'
Shell
.verbose = false
sh = Shell.new

print sh.system("ls", "-l")
Shell
.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT...

Shell#cat(*files) -> Shell::Filter (17120.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...@param files シェルコマンド cat に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | te...

絞り込み条件を変える

Shell#echo(*strings) -> Shell::Filter (17120.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...す.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee...

Shell#glob(pattern) -> Shell::Filter (17120.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

...ます。
パターンの書式については、Dir.[] を参照してください。

動作例
require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | te...

Shell#tee(file) -> Shell::Filter (17120.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

....

@param file シェルコマンドtee に与えるファイル名を文字列で指定します。

動作例
require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | te...

Shell#command_processor -> Shell::CommandProcessor (17102.0)

@todo

@todo

Shell#concat(*jobs) -> Shell::Concat (17102.0)

@todo

@todo

絞り込み条件を変える

Shell#process_controller -> Shell::ProcessController (17102.0)

@todo

@todo

Shell#out(dev = STDOUT, &block) -> () (17035.0)

Shell#transact を呼び出しその結果を dev に出力します。

...
Shell
#transact を呼び出しその結果を dev に出力します。

@param dev 出力先をIO オブジェクトなどで指定します。

@param block transact 内部で実行するシェルを指定します。


使用例:
require 'shell'
Shell
.def_system_command("head")
sh = Shell...

Shell#transact { ... } -> object (17035.0)

ブロック中で shell を self として実行します。

...ブロック中で shell を self として実行します。

例:

require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
}...

Shell#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (17019.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...ァイルへのパスを指定します。

@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"...

Shell#foreach(path = nil, &block) -> () (17019.0)

pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。

...なら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。

@param path ファイルもしくはディレクトリのパスを文字列で指定します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
}...

絞り込み条件を変える

Shell#mkdir(*path) -> Array (17019.0)

Dir.mkdirと同じです。 (複数可)

...ram path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...
<< 1 2 3 ... > >>