るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
4件ヒット [1-4件を表示] (0.011秒)
トップページ > クエリ:chomp[x] > バージョン:2.1.0[x] > クラス:Shell[x]

別のキーワード

  1. _builtin chomp
  2. string chomp
  3. kernel chomp
  4. string chomp!
  5. _builtin chomp!

ライブラリ

キーワード

検索結果

Shell#cat(*files) -> Shell::Filter (22.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 (22.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 (22.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 (22.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...