るりまサーチ

最速Rubyリファレンスマニュアル検索!
201件ヒット [1-100件を表示] (0.050秒)
トップページ > クエリ:-[x] > クエリ:sh[x] > クエリ:cat[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

検索結果

<< 1 2 3 > >>

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

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

....

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

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

Shell::CommandProcessor#cat(*files) -> Shell::Filter (21325.0)

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

....

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

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

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

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

....

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

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

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

@todo

@todo

Shell::CommandProcessor#concat(*jobs) -> Shell::Concat (9400.0)

@todo

@todo

絞り込み条件を変える

Shell::Filter#concat(*jobs) -> Shell::Concat (9400.0)

@todo

@todo

Gem::Specification::MARSHAL_FIELDS -> Hash (9300.0)

@todo

@todo

Gem::Specification::SPECIFICATION_VERSION_HISTORY -> Hash (9300.0)

gemspec ファイルのバージョンの歴史を表す定数です。

gemspec ファイルのバージョンの歴史を表す定数です。

Shell#truncate(path, length) -> 0 (9200.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate...

Shell::CommandProcessor#truncate(path, length) -> 0 (9200.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate...

絞り込み条件を変える

Shell::Filter#truncate(path, length) -> 0 (9200.0)

File クラスにある同名のクラスメソッドと同じです.

...File クラスにある同名のクラスメソッドと同じです.

@param path パスを表す文字列を指定します。

@param length 変更したいサイズを整数で与えます。

@see File.truncate...

shell (6256.0)

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

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

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

=== サンプル

==== Example 1:

require 'shell'
sh
= Shell.cd("/tmp")
sh
.mkdir "shell-test-1" unle...
...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
...
...uire 'shell'
sh
= Shell.new
sh
.cat("/etc/printcap") | sh.tee("tee1") > "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") > "tee12"
sh
.cat("/etc/printcap") | sh.tee("tee1") >> "tee2"
(sh.cat < "/etc/printcap") | sh.tee("tee11") >> "tee12"

==== Example 4:

require 'shell'
sh
= Shell.n...

Logger::Application#set_log(logdev, shift_age = 0, shift_size = 1024000) -> Integer (3300.0)

内部で使用する Logger のオブジェクトを初期化します。

...化します。

@param logdev ログを書き込むファイル名か、 IO オブジェクト(STDOUT, STDERR など)を指定します。

@param shift_age ログファイルを保持する数か、ログファイルを切り替える頻度を指定します。
頻度には daily,...
...ly を文字列で指定することができます。
省略すると、ログの保存先を切り替えません。

@param shift_size shift_age を整数で指定した場合のみ有効です。
このサイズでログファイルを切り替えます。

@re...

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

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

...echo に与える引数を文字列で指定します。

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

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

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

...式については、Dir.[] を参照してください。

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

絞り込み条件を変える

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

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

...与えるファイル名を文字列で指定します。

動作例
require 'shell'
Sh
ell.def_system_command("head")
sh
= Shell.new
sh
.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat
(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}...
<< 1 2 3 > >>