るりまサーチ

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

別のキーワード

  1. rake sh
  2. fileutils sh
  3. constants lock_sh
  4. _builtin lock_sh
  5. sync sh

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

Shell::Echo.new(sh, *strings) (27202.0)

@todo

@todo

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

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

...lter オブジェクトを返します.

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

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

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (24343.0)

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

...lter オブジェクトを返します.

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

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

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

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

...lter オブジェクトを返します.

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

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

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

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

...lter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、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"
}
}
}

@see Dir.[]...

絞り込み条件を変える

Shell::CommandProcessor#glob(pattern) -> Shell::Filter (9236.0)

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

...lter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、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"
}
}
}

@see Dir.[]...

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

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

...lter オブジェクトを返します.

@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、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"
}
}
}

@see Dir.[]...

CSV.filter(input, options = Hash.new) {|row| ... } (6315.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?...
...//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.o...
...pen("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jir...

CSV.filter(input, output, options = Hash.new) {|row| ... } (6315.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?...
...//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.o...
...pen("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jir...

CSV.filter(options = Hash.new) {|row| ... } (6315.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...のデフォルト値は $/ です。

//emlist[例: input, output は初期値][ruby]{
# $ echo "header1,header2\nrow1_1,row1_2" > in.csv; ruby test.rb in.csv

require "csv"

options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?...
...//emlist[例: input, output を指定する][ruby]{
require "csv"
content = <<EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.o...
...pen("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first name"] + " " + row["last name"]
end

# out.csv の内容
# => id,first name,last name,age,full name
# 1,taro,tanaka,20,taro tanaka
# 2,jiro,suzuki,18,jir...

絞り込み条件を変える

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

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

...る 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) | tee(file + ".tee") >> "all.tee"
}
}
}...

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

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

...する Filter オブジェクトを返します.

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

動作例
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::CommandProcessor#cat(*files) -> Shell::Filter (6236.0)

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

...る 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) | tee(file + ".tee") >> "all.tee"
}
}
}...

Shell::CommandProcessor#tee(file) -> Shell::Filter (6236.0)

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

...する Filter オブジェクトを返します.

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

動作例
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::Filter#cat(*files) -> Shell::Filter (6236.0)

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

...る 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) | tee(file + ".tee") >> "all.tee"
}
}
}...

絞り込み条件を変える

<< 1 2 > >>