別のキーワード
種類
- インスタンスメソッド (100)
- 文書 (11)
ライブラリ
-
irb
/ cmd / help (11) -
net
/ imap (11) - shell (24)
-
shell
/ command-processor (24) -
shell
/ filter (30)
クラス
-
IRB
:: ExtendCommand :: Help (11) -
Net
:: IMAP :: FetchData (11) - Shell (24)
-
Shell
:: CommandProcessor (24) -
Shell
:: Filter (30)
検索結果
先頭5件
-
Shell
:: Filter # >>(to) -> self (18118.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("tail.out", "w") # でも同じ。
}... -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (3012.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ファイル名を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (3012.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...与える引数を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (3012.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) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (3012.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...るファイル名を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (3006.0) -
RI から Ruby のドキュメントを参照します。
...ま
す。
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(patt... -
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (24.0)
-
Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or plus minus ast slash hat sq period comma langl rangl eq tilde dollar at under lbrarbra lbra2rbra2 lbra3rbra3 dq colon ac backslash semicolon
...> "nomad"
//}
: % ruby -e "puts 'Hello'"
コマンドラインへの入力を示す。rubyスクリプト上で入力を行うには `command` や system(command) などと書く
===[a:and] &
: xxx & yyy
論理積演算子。または類似の演算を行うメソッド。
//emlist{
p( 3......れば -1
を返すように作ることが期待されています。
: 3 >> 1
シフト演算子。または類似のメソッド。
: a >>= 1
「>>」演算子の自己代入演算子。
//emlist{
a = 3
a >>= 1
p a #=> 1
//}
: { 1 => "11" , 3 => "333" }
ハッシュのリテラル......(`)で囲まれた文字列は、コマンドとして実行され、
その標準出力が文字列として与えられます。d:spec/literal#commandを参照。
//emlist{
puts `ruby -h`
#=> Usage: ruby [switches] [--] [programfile] [arguments]
#=> ....
//}
===[a:backslash] \
バッ... -
Net
:: IMAP :: FetchData # attr -> { String => object } (18.0) -
各メッセージのアトリビュートの値をハッシュテーブルで返します。
...TypeMessage, Net::IMAP::BodyTypeMultipart
のいずれか。
: BODY[<section>]<<partial>>
section で指定されたセクションのボディの内容。文字列。
: BODY.PEEK[<section>]<<partial>>
section で指定されたセクションのメッセージボディの内容。文字......BODY.PEEK[HEADER] と同じ。文字列。
: RFC822.SIZE
メッセージの 822 サイズ。整数。
: RFC822.TEXT
BODY[TEXT] と同じ。文字列。
: UID
UID。整数。
詳しくは 2060 の FETCH command の節を見てください。
@see Net::IMAP#fetch, Net::IMAP#uid_fetch... -
Shell
# cat(*files) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ファイル名を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# echo(*strings) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...与える引数を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# glob(pattern) -> Shell :: Filter (12.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) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Shell
# tee(file) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...るファイル名を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: Filter # cat(*files) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...ファイル名を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: Filter # echo(*strings) -> Shell :: Filter (12.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...与える引数を文字列で指定します。
動作例
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(file + ".tee") >> "all.tee"
}
}
}... -
Shell
:: Filter # glob(pattern) -> Shell :: Filter (12.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) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]...