るりまサーチ

最速Rubyリファレンスマニュアル検索!
546件ヒット [1-100件を表示] (0.045秒)
トップページ > ライブラリ:shell[x] > クエリ:Shell::Filter[x]

別のキーワード

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

キーワード

検索結果

<< 1 2 3 ... > >>

Shell::Filter (23017.0)

コマンドの実行結果はすべて Shell::Filter か、そのサブクラスのインスタンスとして返ります。

...コマンドの実行結果はすべて Shell::Filter か、そのサブクラスのインスタンスとして返ります。...

Shell::Filter.new(sh) -> Shell::Filter (21118.0)

Shell::Filter クラスのインスタンスを返します。 通常このメソッドを直接使う機会は少ないでしょう。

...
Shell::Filter
クラスのインスタンスを返します。
通常このメソッドを直接使う機会は少ないでしょう。...

Shell::Filter#cat(*files) -> Shell::Filter (21102.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::Filter#echo(*strings) -> Shell::Filter (21102.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::Filter#glob(pattern) -> Shell::Filter (21102.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::Filter#input -> Shell::Filter | nil (21102.0)

現在のフィルターを返します。

現在のフィルターを返します。

Shell::Filter#tee(file) -> Shell::Filter (21102.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::Filter#append(to, filter) -> Shell::AppendFile | Shell::AppendIO (21007.0)

@todo

...@todo

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

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

Shell::Filter#|(filter) -> object (21007.0)

パイプ結合を filter に対して行います。

...て行います。

@param filter Shell::Filter オブジェクトを指定します。

@return filter を返します。

使用例
require 'shell'
Shell
.def_system_command("tail")
Shell
.def_system_command("head")
Shell
.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1...

Shell::Filter#+(filter) (21001.0)

執筆者募集

執筆者募集

filter1 + filter2 は filter1の出力の後, filter2の出力を行う。

絞り込み条件を変える

Shell::Filter#<(src) -> self (21001.0)

srcをフィルタの入力とする。 srcが, 文字列ならばファイルを, IOオブジェクトであれ ばそれをそのまま入力とする。

...ばそれをそのまま入力とする。

@param src フィルタの入力を, 文字列もしくは,IO オブジェクトで指定します。

使用例
require 'shell'
Shell
.def_system_command("head")
sh = Shell.new
sh.transact {
(sh.head("-n 30") < "/etc/passwd") > "ugo.txt"
}...

Shell::Filter#>(to) -> self (21001.0)

toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。

...ます。文字列ならばファイルに,IOオブジェクトならばそれに出力します。

使用例
require 'shell'
Shell
.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/etc/passwd...

Shell::Filter#>>(to) -> self (21001.0)

toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば それをそのまま出力とする。

...す。文字列ならばファイルに、IOオブジェクトならばそれに出力します。

使用例
require 'shell'
Shell
.def_system_command("tail")
sh = Shell.new
sh.transact {
(sh.tail("-n 3") < "/etc/passwd") >> "tail.out"
#(sh.tail("-n 3") < "/etc/passwd") >> File.open...

Shell::Filter#[](command, file1, file2 = nil) -> bool | Time | Integer | nil (21001.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::Filter#atime(filename) -> Time (21001.0)

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

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

@param filename ファイル名を表す文字列か IO オブジェクトを指定します。

@see File.atime

絞り込み条件を変える

Shell::Filter#basename(filename, suffix = "") -> String (21001.0)

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

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

@param filename ファイル名を表す文字列を指定します。

@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。

@see File.basename

Shell::Filter#blockdev?(file) -> bool (21001.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@see FileTest.#blockdev?
<< 1 2 3 ... > >>