別のキーワード
ライブラリ
-
drb
/ extservm (1) -
irb
/ cmd / chws (2) -
irb
/ cmd / help (1) -
irb
/ cmd / load (3) -
irb
/ cmd / nop (1) -
irb
/ cmd / pushws (3) -
irb
/ cmd / subirb (3) -
irb
/ ext / use-loader (2) -
irb
/ extend-command (2) - mkmf (8)
-
net
/ imap (1) - optparse (12)
- rake (1)
-
rake
/ packagetask (2) -
rubygems
/ command (17) -
rubygems
/ command _ manager (6) -
rubygems
/ commands / build _ command (2) -
rubygems
/ commands / dependency _ command (3) -
rubygems
/ commands / lock _ command (2) -
rubygems
/ commands / unpack _ command (1) -
rubygems
/ commands / which _ command (2) -
rubygems
/ version _ option (2) - shell (10)
-
shell
/ builtin-command (2) -
shell
/ command-processor (66) -
shell
/ filter (13) -
shell
/ process-controller (5) -
shell
/ system-command (15)
クラス
-
DRb
:: ExtServManager (1) -
Gem
:: Command (17) -
Gem
:: CommandManager (6) -
Gem
:: Commands :: BuildCommand (2) -
Gem
:: Commands :: DependencyCommand (3) -
Gem
:: Commands :: LockCommand (2) -
Gem
:: Commands :: UnpackCommand (1) -
Gem
:: Commands :: WhichCommand (2) -
IRB
:: ExtendCommand :: ChangeWorkspace (1) -
IRB
:: ExtendCommand :: CurrentWorkingWorkspace (1) -
IRB
:: ExtendCommand :: Foreground (1) -
IRB
:: ExtendCommand :: Help (1) -
IRB
:: ExtendCommand :: IrbCommand (1) -
IRB
:: ExtendCommand :: Kill (1) -
IRB
:: ExtendCommand :: Load (1) -
IRB
:: ExtendCommand :: Nop (1) -
IRB
:: ExtendCommand :: PopWorkspace (1) -
IRB
:: ExtendCommand :: PushWorkspace (1) -
IRB
:: ExtendCommand :: Require (1) -
IRB
:: ExtendCommand :: Source (1) -
IRB
:: ExtendCommand :: Workspaces (1) -
Net
:: IMAP :: FetchData (1) - OptionParser (12)
-
Rake
:: PackageTask (2) - Shell (10)
-
Shell
:: BuiltInCommand (2) -
Shell
:: CommandProcessor (66) -
Shell
:: Filter (13) -
Shell
:: ProcessController (5) -
Shell
:: SystemCommand (15)
モジュール
- FileUtils (1)
-
Gem
:: VersionOption (2) -
IRB
:: ExtendCommandBundle (4) - Kernel (8)
キーワード
- < (1)
- > (1)
- >> (1)
- [] (4)
- active? (2)
-
add
_ extra _ args (1) -
add
_ option (1) -
add
_ platform _ option (1) -
add
_ schedule (1) -
add
_ version _ option (1) - append (1)
- atime (1)
- attr (1)
- basename (1)
- begins? (1)
- blockdev? (1)
- cat (3)
-
cc
_ command (1) - chardev? (1)
-
check
_ point (1) - chmod (1)
- chown (1)
-
command
_ processor (1) - complain (1)
- concat (1)
-
cpp
_ command (1) - ctime (1)
- defaults= (1)
-
defaults
_ str (1) - delete (1)
- directory? (1)
- dirname (1)
- each (1)
- echo (3)
- executable? (1)
-
executable
_ real? (1) - execute (14)
- exist? (1)
- exists? (1)
- file? (1)
-
find
_ command (1) -
find
_ command _ possibilities (1) -
find
_ gems (1) -
find
_ paths (1) -
find
_ reverse _ dependencies (1) -
find
_ system _ command (3) -
finish
_ all _ jobs (1) - flush (1)
- foreach (1)
- ftype (1)
-
gem
_ paths (1) -
get
_ all _ gem _ names (1) -
get
_ one _ gem _ name (1) -
get
_ one _ optional _ argument (1) -
get
_ path (1) - glob (3)
- grpowned? (1)
- handles? (1)
- identical? (1)
- input= (1)
-
install
_ alias _ method (1) - invoke (1)
-
irb
_ exit (1) -
irb
_ load (1) -
irb
_ require (1) - join (1)
- kill (1)
-
kill
_ job (1) - link (1)
-
link
_ command (1) -
load
_ gemspecs (1) - lstat (1)
- mkdir (1)
- mtime (1)
- name (1)
- notify (3)
- on (12)
- open (1)
- out (3)
- owned? (1)
- pipe? (1)
-
print
_ dependencies (1) -
process
_ args (1) -
program
_ name= (1) - readable? (1)
-
readable
_ real? (1) - readlink (1)
-
register
_ command (1) -
remove
_ option (1) - rename (1)
- rm (1)
- rmdir (1)
- run (1)
- service (1)
- setgid? (1)
- setuid? (1)
- sfork (1)
- sh (1)
-
show
_ lookup _ failure (1) - size (1)
- size? (1)
- socket? (1)
-
spec
_ path (1) - split (1)
- start (1)
-
start
_ export (1) -
start
_ import (1) -
start
_ job (1) - stat (1)
- sticky? (1)
- summary= (1)
-
super
_ each (1) - symlink (1)
- symlink? (1)
- system (3)
-
tar
_ command= (1) - tee (3)
- terminate (1)
-
terminate
_ job (1) - test (3)
- truncate (1)
-
try
_ do (2) - unlink (1)
- utime (1)
- wait? (2)
-
world
_ readable? (1) -
world
_ writable? (1) - writable? (1)
-
writable
_ real? (1) - xpopen (2)
- xsystem (1)
- yaml? (1)
- zero? (1)
-
zip
_ command= (1) - | (1)
検索結果
先頭5件
-
Shell
:: SystemCommand # command -> String (63355.0) -
@todo
@todo
コマンド名を返します。 -
Gem
:: CommandManager # find _ command(command _ name) -> Gem :: Command | nil (28003.0) -
登録されているコマンドからマッチしたものを返します。
登録されているコマンドからマッチしたものを返します。
@param command_name コマンド名を文字列で指定します。
@return Gem::Command のサブクラスのインスタンスを返します。
@raise RuntimeError マッチする可能性のあるコマンドが複数ある場合に発生します。
また、マッチするコマンドが無かった場合にも発生します。 -
Shell
:: CommandProcessor # find _ system _ command(command) (27658.0) -
@todo
@todo -
Gem
:: CommandManager # find _ command _ possibilities(command _ name) -> Array (27646.0) -
登録されているコマンドでマッチする可能性のあるものを返します。
登録されているコマンドでマッチする可能性のあるものを返します。
@param command_name コマンド名を文字列で指定します。 -
Gem
:: CommandManager # register _ command(command _ name) -> false (27646.0) -
コマンドを自身に登録します。
コマンドを自身に登録します。
@param command_name コマンド名をシンボルで指定します。 -
Shell
# find _ system _ command(command) (18658.0) -
@todo
@todo -
Shell
:: Filter # find _ system _ command(command) (18658.0) -
@todo
@todo -
Shell
# command _ processor -> Shell :: CommandProcessor (18655.0) -
@todo
@todo -
Rake
:: PackageTask # tar _ command=(command) (18646.0) -
tar コマンドとして使用するコマンドを設定します。
tar コマンドとして使用するコマンドを設定します。
@param command コマンドを文字列で指定します。 -
Rake
:: PackageTask # zip _ command=(command) (18646.0) -
zip コマンドとして使用するコマンドを設定します。
zip コマンドとして使用するコマンドを設定します。
@param command コマンドを文字列で指定します。 -
Kernel
# link _ command(ldflags , opt = "" , libpath = $ DEFLIBPATH| $ LIBPATH) -> String (18379.0) -
実際にリンクする際に使用するコマンドを返します。
実際にリンクする際に使用するコマンドを返します。
@param ldflags LDFLAGS に追加する値を指定します。
@param opt LIBS に追加する値を指定します。
@param libpath LIBPATH に指定する値を指定します。
@see RbConfig.expand -
Kernel
# cpp _ command(outfile , opt = "") -> String (18361.0) -
実際にプリプロセッサを実行する際に使用するコマンドを返します。
実際にプリプロセッサを実行する際に使用するコマンドを返します。
@param outfile 出力ファイルの名前を指定します。
@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Kernel
# cc _ command(opt = "") -> String (18343.0) -
実際にコンパイルする際に使用するコマンドを返します。
実際にコンパイルする際に使用するコマンドを返します。
@param opt コンパイラに与える追加のコマンドライン引数を指定します。
@see RbConfig.expand -
Gem
:: Commands :: DependencyCommand # find _ gems(name , source _ index) -> Hash (18058.0) -
与えられた Gem の名前をインデックスから検索します。
与えられた Gem の名前をインデックスから検索します。
@param name Gem の名前を指定します。
@param source_index Gem::SourceIndex のインスタンスを指定します。
@see Gem::SourceIndex#search -
Shell
:: SystemCommand # name -> String (18055.0) -
@todo
@todo
コマンド名を返します。 -
Gem
:: Commands :: DependencyCommand # print _ dependencies(spec , level = 0) -> String (18040.0) -
依存関係を表す文字列を返します。
依存関係を表す文字列を返します。
@param spec Gem::Specification のインスタンスを指定します。
@param level 依存関係の深さを指定します。 -
Gem
:: Commands :: LockCommand # complain(message) -> () (18040.0) -
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
指定されたメッセージを表示します。--strict が有効な場合は例外が発生します。
@param message 表示するメッセージを指定します。
@raise Gem::Exception コマンドラインオプションに --strict が指定されている場合に発生します。 -
Gem
:: Commands :: UnpackCommand # get _ path(gemname , version _ req) -> String | nil (18040.0) -
引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。
引数で指定された条件にマッチする Gem パッケージを保存しているパスを返します。
@param gemname Gem パッケージの名前を指定します。
@param version_req バージョンの満たすべき条件を文字列で指定します。 -
Gem
:: Commands :: WhichCommand # find _ paths(package _ name , dirs) -> Array (18040.0) -
dirs から package_name という名前を持つファイルを探索します。
dirs から package_name という名前を持つファイルを探索します。
以下の拡張子を持つファイルが対象です。
%w[.rb .rbw .so .dll .bundle]
@param package_name ファイルの名前を指定します。
@param dirs 探索するディレクトリを文字列の配列で指定します。 -
Gem
:: Commands :: BuildCommand # load _ gemspecs(filename) -> Array (18022.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename ファイル名を指定します。 -
Gem
:: Commands :: BuildCommand # yaml?(filename) -> bool (18022.0) -
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
与えられたファイル名を持つファイルが yaml ファイルである場合に真を返します。
@param filename ファイル名を指定します。 -
Gem
:: Commands :: DependencyCommand # find _ reverse _ dependencies(spec) -> Array (18022.0) -
与えられた Gem スペックに依存する Gem のリストを返します。
与えられた Gem スペックに依存する Gem のリストを返します。
@param spec Gem::Specification のインスタンスを指定します。 -
Gem
:: Commands :: LockCommand # spec _ path(gem _ full _ name) -> String (18022.0) -
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
@param gem_full_name Gem パッケージの名前を指定します。 -
Gem
:: Commands :: WhichCommand # gem _ paths(spec) -> Array (18022.0) -
与えられた Gem::Specification のインスタンスからその Gem が require するファイルのあるディレクトリをまとめて返します。
与えられた Gem::Specification のインスタンスからその Gem が
require するファイルのあるディレクトリをまとめて返します。
@param spec Gem::Specification のインスタンスを指定します。 -
IRB
:: ExtendCommand :: IrbCommand # execute(*obj) -> IRB :: Irb (18022.0) -
新しいサブ irb インタプリタを起動します。
新しいサブ irb インタプリタを起動します。
@param obj 新しいサブ irb インタプリタで self にするオブジェクトを指定
します。省略した場合は irb を起動したときの main オブジェク
トを self にします。 -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (9745.0) -
command を実行する.
command を実行する.
@param 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 -
Gem
:: CommandManager # [](command _ name) -> Gem :: Command | nil (9646.0) -
引数で指定されたコマンド名に対応するクラスのインスタンスを返します。
引数で指定されたコマンド名に対応するクラスのインスタンスを返します。
@param command_name コマンド名を文字列で指定します。 -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (9400.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (9400.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@param file1 文字列でファイルへのパスを指定します。
@param file2 文字列でファイルへのパスを指定します。
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
sh.m... -
Shell
:: CommandProcessor # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (9088.0) -
@todo
@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。 -
Shell
:: SystemCommand # notify(*opts) -> String (9088.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: SystemCommand # notify(*opts) {|message| . . . } -> String (9088.0) -
@todo
@todo
@param opts
@see Shell#notify -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (9076.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown -
Shell
:: CommandProcessor # utime(atime , mtime , *filename) -> Integer (9076.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime -
Shell
:: SystemCommand # each(rs = nil) {|line| . . . } (9070.0) -
@todo
@todo
@param rs -
Gem
:: Command # show _ lookup _ failure(gem _ name , version , errors = nil) -> () (9058.0) -
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
Gem が見つからなかった場合、メッセージを表示するために使用するメソッドです。
@param gem_name Gem の名前を指定します。
@param version Gem のバージョンを指定します。
@param errors Gem が見つからなかった理由を表すオブジェクトを格納した配列を指定します。 -
IRB
:: ExtendCommand :: Load # execute(file _ name , priv = nil) -> nil (9058.0) -
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実 行します。
ファイル path を Ruby スクリプトとみなし、現在の irb インタプリタ上で実
行します。
Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたかの
ように、irb 上で一行ずつ評価されます。
@param file_name ファイル名を文字列で指定します。
@param priv 真を指定した場合は実行は内部的に生成される無名モジュール上
で行われ、グローバルな名前空間を汚染しません。
@raise LoadError 読み込みに失敗した場合に発生します。 -
IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE) (9058.0) -
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
@param to 新しいメソッド名を Symbol か文字列で指定します。
@param from 元のメソッド名を Symbol か文字列で指定します。
@param override 新しいメソッド名が定義済みであった場合にそのメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_... -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (9058.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、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|
... -
Shell
:: CommandProcessor # link(old , new) -> 0 (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: CommandProcessor # open(path , mode) -> File | Dir (9058.0) -
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
path がファイルなら、 File.open path がディレクトリなら、 Dir.open の動作をします。
@param path 開きたいパスを指定します。
@param mode アクセスモードを指定します。path がディレクトリの場合は無視されます。
@see File.open, Dir.open -
Shell
:: CommandProcessor # out(dev = STDOUT , &block) -> () (9058.0) -
Shell#transact を呼び出しその結果を dev に出力します。
Shell#transact を呼び出しその結果を dev に出力します。
@param dev 出力先をIO オブジェクトなどで指定します。
@param block transact 内部で実行するシェルを指定します。
使用例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
File.open("out.txt", "w"){ |fp|
sh.out(fp) {
system("ls", "-l") | head("-n 3")
}
} -
Shell
:: CommandProcessor # rename(from , to) -> 0 (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: CommandProcessor # symlink(old , new) -> 0 (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (9058.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: BuiltInCommand # active? -> true (9052.0) -
@todo
@todo -
Shell
:: BuiltInCommand # wait? -> false (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # check _ point (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # finish _ all _ jobs (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # identical? (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # notify(*opts) { . . . } -> () (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # world _ readable? (9052.0) -
@todo
@todo -
Shell
:: CommandProcessor # world _ writable? (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # active? -> bool (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # flush -> () (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # input=(inp) (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # start -> () (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # start _ export (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # start _ import -> () (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # super _ each -> () (9052.0) -
@todo
@todo
Shell::Filter#each です。 -
Shell
:: SystemCommand # terminate -> () (9052.0) -
@todo
@todo -
Shell
:: SystemCommand # wait? -> bool (9052.0) -
@todo
@todo -
Gem
:: Command # add _ option(*opts) {|value , options| . . . } (9040.0) -
コマンドに対するコマンドラインオプションとハンドラを追加します。
コマンドに対するコマンドラインオプションとハンドラを追加します。
ブロックには、コマンドライン引数の値とそのオプションが渡されます。
オプションはハッシュになっています。
@param opts オプションを指定します。
@see OptionParser#make_switch -
Gem
:: Command # begins?(long , short) -> bool (9040.0) -
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
long が short で始まる文字列である場合真を返します。そうでない場合は偽を返します。
@param long 長いコマンドラインオプションを指定します。
@param short 短いコマンドラインオプションを指定します。 -
Gem
:: Command # defaults _ str -> String (9040.0) -
このメソッドはサブクラスで再定義されます。 コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
このメソッドはサブクラスで再定義されます。
コマンドのオプションで使用するデフォルト値を表示するために使用する文字列を返します。
@see Gem::Command#arguments -
Shell
:: CommandProcessor # atime(filename) -> Time (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # blockdev?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (9040.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする 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) | tee(file + ".tee") >> "al... -
Shell
:: CommandProcessor # chardev?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
:: CommandProcessor # ctime(filename) -> Time (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
:: CommandProcessor # delete(*filename) -> Integer (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # directory?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
:: CommandProcessor # dirname(filename) -> String (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (9040.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする 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(file + ".tee") >> "al... -
Shell
:: CommandProcessor # executable?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
:: CommandProcessor # executable _ real?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
:: CommandProcessor # exist?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # exists?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # expand _ path(path) -> String (9040.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: CommandProcessor # file?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file? -
Shell
:: CommandProcessor # ftype(filename) -> String (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype -
Shell
:: CommandProcessor # grpowned?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
:: CommandProcessor # join(*item) -> String (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # lstat(filename) -> File :: Stat (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat -
Shell
:: CommandProcessor # mkdir(*path) -> Array (9040.0) -
Dir.mkdirと同じです。 (複数可)
Dir.mkdirと同じです。 (複数可)
@param path 作成するディレクトリ名を文字列で指定します。
@return 作成するディレクトリの一覧の配列を返します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end -
Shell
:: CommandProcessor # mtime(filename) -> Time (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime -
Shell
:: CommandProcessor # owned?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
:: CommandProcessor # pipe?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#pipe? -
Shell
:: CommandProcessor # readable?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
Shell
:: CommandProcessor # readable _ real?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: CommandProcessor # readlink(path) -> String (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: CommandProcessor # rm(*filename) -> Integer (9040.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # setgid?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
:: CommandProcessor # setuid?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
:: CommandProcessor # size(file) -> Integer (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # size?(file) -> Integer | nil (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # socket?(file) -> bool (9040.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket?