種類
- インスタンスメソッド (248)
- 特異メソッド (41)
- モジュール関数 (4)
- 定数 (2)
クラス
- Array (1)
- Shell (104)
-
Shell
:: BuiltInCommand (2) -
Shell
:: CommandProcessor (74) -
Shell
:: Filter (71) -
Shell
:: ProcessController (21) -
Shell
:: SystemCommand (12) -
Shell
:: Void (1) - String (2)
モジュール
- Shellwords (7)
キーワード
- < (1)
- > (1)
- >> (1)
- NoDelegateMethods (1)
-
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (1) - [] (3)
- activate (1)
- active? (2)
-
active
_ job? (1) -
active
_ jobs (1) -
active
_ jobs _ exist? (1) -
active
_ process _ controllers (1) -
add
_ schedule (1) -
alias
_ command (3) -
alias
_ map (1) - append (3)
- atime (3)
- basename (3)
-
block
_ output _ synchronize (1) - blockdev? (3)
- cascade (1)
- cat (3)
- cd (2)
- chardev? (3)
- chdir (1)
- chmod (3)
- chown (3)
- command (1)
-
command
_ processor (1) - concat (3)
- ctime (3)
- cwd (1)
- debug (2)
- debug? (2)
-
debug
_ output _ lock (1) -
debug
_ output _ locked? (1) -
debug
_ output _ try _ lock (1) -
debug
_ output _ unlock (1) -
def
_ builtin _ commands (1) -
def
_ system _ command (2) -
default
_ record _ separator (1) -
default
_ system _ path (1) - delete (3)
- dir (1)
-
dir
_ stack (1) - directory? (3)
- dirname (3)
- dirs (1)
- each (2)
-
each
_ active _ object (1) - echo (3)
- escape (1)
- executable? (3)
-
executable
_ real? (3) - exist? (3)
- exists? (3)
- file? (3)
- flush (1)
- foreach (3)
- ftype (3)
- getwd (1)
- glob (3)
- grpowned? (3)
- inactivate (1)
- initialize (1)
- input (1)
- inspect (1)
-
install
_ builtin _ commands (1) -
install
_ system _ commands (2) - jobs (2)
-
jobs
_ exist? (1) - join (4)
- kill (2)
-
kill
_ job (1) - link (3)
- lstat (3)
- mkdir (3)
- mtime (3)
- name (1)
- new (2)
- notify (6)
- open (3)
- out (3)
- owned? (3)
- pipe? (3)
- popd (1)
- popdir (1)
-
process
_ controller (1) -
process
_ controllers _ exclusive (1) - pushd (1)
- pushdir (1)
- pwd (1)
- readable? (3)
-
readable
_ real? (3) - readlink (3)
-
record
_ separator (1) - rehash (3)
- rename (3)
- rm (3)
- rmdir (3)
-
run
_ config (1) - setgid? (3)
- setuid? (3)
- sfork (1)
- shell (1)
- shellescape (2)
- shelljoin (2)
- shellsplit (2)
- shellwords (1)
- size (3)
- size? (3)
- socket? (3)
- split (4)
- start (1)
-
start
_ import (1) - stat (3)
- sticky? (3)
-
super
_ each (1) - symlink (3)
- symlink? (3)
- system (3)
-
system
_ path (1) - tee (3)
- terminate (1)
- test (3)
-
to
_ a (1) -
to
_ s (1) - transact (3)
- truncate (3)
- umask (1)
-
unalias
_ command (2) -
undef
_ system _ command (2) - unlink (3)
- utime (3)
- verbose (2)
- verbose? (2)
- wait? (2)
-
wait
_ all _ jobs _ execution (1) -
wait
_ to _ finish _ all _ process _ controllers (1) -
waiting
_ job? (1) -
waiting
_ jobs (1) -
waiting
_ jobs _ exist? (1) - writable? (3)
-
writable
_ real? (3) - zero? (3)
- | (1)
検索結果
先頭5件
-
Shell
# readable _ real?(file) -> bool (27907.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: CommandProcessor # readable _ real?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: Filter # readable _ real?(file) -> bool (27904.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: ProcessController # shell -> Shell (27904.0) -
@todo
@todo -
Shell
:: ProcessController :: USING _ AT _ EXIT _ WHEN _ PROCESS _ EXIT -> true (27904.0) -
@todo
@todo -
Shellwords
. # shellsplit(line) -> [String] (27640.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...ォートが現れた場合に発生します。
例:
require 'shellwords'
p Shellwords.shellwords(%q{ foo bar "foo bar"\ baz 'foo bar' })
# => ["foo", "bar", "foo bar baz", "foo bar"]
p Shellwords.shellwords(%q{ A B C "D E F" "G","H I" })
# => ["A", "B", "C", "D... -
Shellwords
. # shellwords(line) -> [String] (27640.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...ォートが現れた場合に発生します。
例:
require 'shellwords'
p Shellwords.shellwords(%q{ foo bar "foo bar"\ baz 'foo bar' })
# => ["foo", "bar", "foo bar baz", "foo bar"]
p Shellwords.shellwords(%q{ A B C "D E F" "G","H I" })
# => ["A", "B", "C", "D... -
Shell
# delete(*filename) -> Integer (27607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # delete(*filename) -> Integer (27604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor :: NoDelegateMethods -> [String] (27604.0) -
内部で使用する定数です。
内部で使用する定数です。 -
Shell
:: Filter # delete(*filename) -> Integer (27604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shellwords
. # shellescape(str) -> String (27604.0) -
文字列を Bourne シェルのコマンドライン中で安全に使えるようにエスケープします。
...ープします。
@param str エスケープの対象となる文字列を指定します。
@return エスケープされた文字列を返します。
例:
require 'shellwords'
pattern = 'Jan 15'
puts "grep #{Shellwords.shellescape(pattern)} file"
# => grep Jan\ 15 file... -
Shellwords
. # shelljoin(array) -> String (27604.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
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (19207.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (19204.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
:: Filter # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (19204.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
# basename(filename , suffix = "") -> String (18907.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
# command _ processor -> Shell :: CommandProcessor (18907.0) -
@todo
@todo -
Shell
# process _ controller -> Shell :: ProcessController (18907.0) -
@todo
@todo -
Shell
# system(command , *opts) -> Shell :: SystemCommand (18907.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (18904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (18904.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: Filter # basename(filename , suffix = "") -> String (18904.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: Filter # system(command , *opts) -> Shell :: SystemCommand (18904.0) -
command を実行する.
...で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
Shell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (18661.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
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (18658.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 # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (18658.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
. install _ system _ commands(pre = "sys _ ") -> () (18643.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
...イルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5 のような例。
require 'shell'
Shell.install......_system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}... -
Shell
# atime(filename) -> Time (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
# blockdev?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
# chardev?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
# ctime(filename) -> Time (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
# debug -> bool | Integer (18607.0) -
@todo
@todo -
Shell
# debug? -> bool | Integer (18607.0) -
@todo
@todo -
Shell
# directory?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
# dirname(filename) -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
# echo(*strings) -> Shell :: Filter (18607.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
# executable?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
# executable _ real?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
# exist?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
# exists?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
# expand _ path(path) -> String (18607.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
# file?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file? -
Shell
# foreach(path = nil , &block) -> () (18607.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
# ftype(filename) -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype -
Shell
# getwd -> String (18607.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# grpowned?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
# mtime(filename) -> Time (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime -
Shell
# open(path , mode) -> File | Dir (18607.0) -
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
@param path 開きたいパスを指定します。
@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。
@see File.open, Dir.open -
Shell
# owned?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
# pipe?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#pipe? -
Shell
# readable?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
Shell
# readlink(path) -> String (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
# record _ separator -> String (18607.0) -
@todo
@todo -
Shell
# rehash -> {} (18607.0) -
登録されているシステムコマンドの情報をクリアします。 通常、使うことはありません。
登録されているシステムコマンドの情報をクリアします。
通常、使うことはありません。 -
Shell
# rename(from , to) -> 0 (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
# rm(*filename) -> Integer (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
# setgid?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
# setuid?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
# size(file) -> Integer (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
# size?(file) -> Integer | nil (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
# socket?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket? -
Shell
# system _ path -> Array (18607.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Shell
# tee(file) -> Shell :: Filter (18607.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
# truncate(path , length) -> 0 (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
# utime(atime , mtime , *filename) -> Integer (18607.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime -
Shell
# verbose -> bool (18607.0) -
@todo
@todo -
Shell
# verbose? -> bool (18607.0) -
@todo
@todo -
Shell
# writable?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable? -
Shell
# writable _ real?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real? -
Shell
# zero?(file) -> bool (18607.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero? -
Shell
. cascade -> bool (18607.0) -
@todo
@todo -
Shell
. debug -> bool | Integer (18607.0) -
@todo
@todo
デバッグ用フラグを参照します。 -
Shell
. debug? -> bool | Integer (18607.0) -
@todo
@todo
デバッグ用フラグを参照します。 -
Shell
. debug _ output _ lock -> Mutex (18607.0) -
@todo
@todo
@see Thread::Mutex#lock -
Shell
. debug _ output _ locked? -> bool (18607.0) -
@todo
@todo
@see Thread::Mutex#locked? -
Shell
. debug _ output _ try _ lock -> bool (18607.0) -
@todo
@todo
@see Thread::Mutex#try_lock -
Shell
. debug _ output _ unlock -> Mutex | nil (18607.0) -
@todo
@todo
@see Thread::Mutex#unlock -
Shell
. def _ system _ command(command , path = command) -> nil (18607.0) -
Shell のメソッドとして command を登録します.
...
Shell のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッド......ない場合はcommand と同じになります。
例)
require 'shell'
Shell.def_system_command "ls"
# ls を定義
Shell.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義
sh = Shell.new
sh.transact {
ls.each { |l|
puts l
}
(ls("-l... -
Shell
. default _ record _ separator -> String (18607.0) -
執筆者募集
...執筆者募集
Shell で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。
@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま... -
Shell
. default _ system _ path -> Array (18607.0) -
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
...
Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。
@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。
動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [......"/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"... -
Shell
. new(pwd = Dir . pwd , umask = nil) -> Shell (18607.0) -
プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.
...プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ
ブジェクトを生成します.
@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (18607.0) -
commandを削除します.
...mmand 削除するコマンドの文字列を指定します。
動作例:
require 'shell'
Shell.def_system_command("ls")
# ls を定義
Shell.undef_system_command("ls")
# ls を 削除
sh = Shell.new
begin
sh.transact {
ls("-l").each {|l|
puts l
}
}
r... -
Shell
. verbose -> bool (18607.0) -
@todo
@todo -
Shell
. verbose? -> bool (18607.0) -
@todo
@todo -
Array
# shelljoin -> String (18604.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...スケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
array.shelljoin は、Shellwords.shelljoin(array) と等価です。
@return エスケープ結果を連結した文字列を返します。
@see Shellwords.#shelljoin... -
Shell
:: BuiltInCommand # active? -> true (18604.0) -
@todo
@todo -
Shell
:: CommandProcessor # atime(filename) -> Time (18604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # blockdev?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
:: CommandProcessor # chardev?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
:: CommandProcessor # ctime(filename) -> Time (18604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
:: CommandProcessor # directory?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
:: CommandProcessor # dirname(filename) -> String (18604.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (18604.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 # executable?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
:: CommandProcessor # executable _ real?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
:: CommandProcessor # exist?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # exists?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # expand _ path(path) -> String (18604.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: CommandProcessor # file?(file) -> bool (18604.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file?