種類
- インスタンスメソッド (168)
- 特異メソッド (4)
- モジュール関数 (2)
- クラス (1)
クラス
- Shell (55)
-
Shell
:: AppendFile (2) -
Shell
:: AppendIO (1) -
Shell
:: Cat (1) -
Shell
:: CommandProcessor (55) -
Shell
:: Filter (56) -
Shell
:: Glob (1) -
Shell
:: Tee (1)
モジュール
- Shellwords (2)
キーワード
- > (1)
- >> (1)
- AppendFile (1)
- [] (3)
- append (3)
- atime (3)
- basename (3)
- blockdev? (3)
- cat (3)
- chardev? (3)
- chmod (3)
- chown (3)
- ctime (3)
- delete (3)
- directory? (3)
- dirname (3)
- each (1)
- echo (3)
- executable? (3)
-
executable
_ real? (3) - exist? (3)
- exists? (3)
- file? (3)
- foreach (3)
- ftype (3)
- glob (3)
- grpowned? (3)
- input= (1)
- join (3)
- link (3)
- lstat (3)
- mtime (3)
- new (4)
- open (3)
- out (3)
- owned? (3)
- pipe? (3)
- readable? (3)
-
readable
_ real? (3) - readlink (3)
- rename (3)
- rm (3)
- setgid? (3)
- setuid? (3)
- shellescape (1)
- shelljoin (1)
- size (3)
- size? (3)
- socket? (3)
- split (3)
- stat (3)
- sticky? (3)
- symlink (3)
- symlink? (3)
- tee (3)
- test (3)
- truncate (3)
- unlink (3)
- utime (3)
- writable? (3)
-
writable
_ real? (3) - zero? (3)
検索結果
先頭5件
-
Shell
:: CommandProcessor # setgid?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
:: CommandProcessor # setuid?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
:: CommandProcessor # socket?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket? -
Shell
:: CommandProcessor # sticky?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#sticky? -
Shell
:: CommandProcessor # symlink?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: CommandProcessor # writable?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable? -
Shell
:: CommandProcessor # writable _ real?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real? -
Shell
:: CommandProcessor # zero?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero? -
Shell
:: Filter # blockdev?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
:: Filter # chardev?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
:: Filter # directory?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
:: Filter # executable?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
:: Filter # executable _ real?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
:: Filter # grpowned?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
:: Filter # owned?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
:: Filter # pipe?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#pipe? -
Shell
:: Filter # readable?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
Shell
:: Filter # readable _ real?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: Filter # setgid?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
:: Filter # setuid?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
:: Filter # socket?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket? -
Shell
:: Filter # sticky?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#sticky? -
Shell
:: Filter # symlink?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: Filter # writable?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable? -
Shell
:: Filter # writable _ real?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real? -
Shell
:: Filter # zero?(file) -> bool (325.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero? -
Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (307.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Glob # each(rs = nil) {|file| . . . } (307.0) -
@todo
@todo -
Shell
:: AppendIO . new(sh , filename) (304.0) -
@todo
@todo -
Shell
:: Cat . new(sh , *filenames) (304.0) -
@todo
@todo -
Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (304.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Filter # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (304.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Tee . new(sh , filename) (304.0) -
@todo
@todo -
Shell
# echo(*strings) -> Shell :: Filter (79.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 (79.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
:: CommandProcessor # echo(*strings) -> Shell :: Filter (76.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
:: CommandProcessor # glob(pattern) -> Shell :: Filter (76.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 # echo(*strings) -> Shell :: Filter (76.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 (76.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... -
Shellwords
. # shelljoin(array) -> String (76.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...スケープには、Shellwords.#shellescape と
同じ規則が適用されます。
@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連結した文字列を返します。
例:
require 'shellwords'
pattern =......'Jan 15'
file = 'file name with spaces'
puts Shellwords.shelljoin(['grep', pattern, file])
# => grep Jan\ 15 file\ name\ with\ spaces... -
Shell
# expand _ path(path) -> String (73.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
# join(*item) -> String (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
# link(old , new) -> 0 (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
# readlink(path) -> String (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
# rename(from , to) -> 0 (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
# split(pathname) -> [String] (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split -
Shell
# symlink(old , new) -> 0 (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
# truncate(path , length) -> 0 (73.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
# unlink(path) -> self (73.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: CommandProcessor # expand _ path(path) -> String (70.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: CommandProcessor # join(*item) -> String (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # link(old , new) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: CommandProcessor # readlink(path) -> String (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: CommandProcessor # rename(from , to) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: CommandProcessor # split(pathname) -> [String] (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split -
Shell
:: CommandProcessor # symlink(old , new) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: CommandProcessor # unlink(path) -> self (70.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: Filter # join(*item) -> String (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: Filter # link(old , new) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: Filter # readlink(path) -> String (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: Filter # rename(from , to) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: Filter # split(pathname) -> [String] (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split -
Shell
:: Filter # symlink(old , new) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: Filter # truncate(path , length) -> 0 (70.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: Filter # unlink(path) -> self (70.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
# foreach(path = nil , &block) -> () (55.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...なら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
}... -
Shell
:: CommandProcessor # foreach(path = nil , &block) -> () (52.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...なら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
}... -
Shell
:: Filter # foreach(path = nil , &block) -> () (52.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
...なら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
}... -
Shellwords
. # shellescape(str) -> String (40.0) -
文字列を Bourne シェルのコマンドライン中で安全に使えるようにエスケープします。
...ープします。
@param str エスケープの対象となる文字列を指定します。
@return エスケープされた文字列を返します。
例:
require 'shellwords'
pattern = 'Jan 15'
puts "grep #{Shellwords.shellescape(pattern)} file"
# => grep Jan\ 15 file... -
Shell
# out(dev = STDOUT , &block) -> () (25.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell... -
Shell
:: CommandProcessor # out(dev = STDOUT , &block) -> () (22.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell... -
Shell
:: Filter # >(to) -> self (22.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 (22.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 # out(dev = STDOUT , &block) -> () (22.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell...