別のキーワード
ライブラリ
- ビルトイン (29)
- pty (1)
-
rexml
/ sax2listener (1) -
rubygems
/ command _ manager (1) - shell (2)
-
shell
/ command-processor (68) -
shell
/ process-controller (15) -
shell
/ system-command (1) - socket (1)
クラス
- BasicSocket (1)
- Exception (2)
- File (1)
-
Gem
:: CommandManager (1) - Object (1)
-
PTY
:: ChildExited (1) -
Process
:: Status (15) -
Process
:: Tms (8) - Shell (2)
-
Shell
:: CommandProcessor (68) -
Shell
:: ProcessController (15) -
Shell
:: SystemCommand (1) - SignalException (2)
モジュール
キーワード
- & (1)
- == (1)
- >> (1)
- [] (1)
-
active
_ job? (1) -
active
_ jobs (1) -
active
_ jobs _ exist? (1) -
add
_ schedule (1) - append (1)
- atime (1)
- basename (1)
- blockdev? (1)
- cat (1)
- chardev? (1)
-
check
_ point (1) - chmod (1)
- chown (1)
-
command
_ processor (1) - concat (1)
- coredump? (1)
- cstime (1)
- cstime= (1)
- ctime (1)
- cutime (1)
- cutime= (1)
- delete (1)
- directory? (1)
- dirname (1)
- echo (1)
- exception (2)
- executable? (1)
-
executable
_ real? (1) - exist? (1)
- exists? (1)
- exited? (1)
- exitstatus (1)
- file? (1)
-
find
_ system _ command (1) -
finish
_ all _ jobs (1) - flock (1)
- foreach (1)
- ftype (1)
- getpeereid (1)
- glob (1)
- grpowned? (1)
- identical? (1)
- inspect (1)
- jobs (1)
-
jobs
_ exist? (1) - join (1)
- kill (1)
-
kill
_ job (1) - link (1)
- lstat (1)
- mkdir (1)
- mtime (1)
- notify (1)
- open (1)
- out (1)
- owned? (1)
- pid (1)
- pipe? (1)
-
process
_ args (1) -
process
_ controller (1) -
processing
_ instruction (1) - readable? (1)
-
readable
_ real? (1) - readlink (1)
- rehash (1)
- rename (1)
-
respond
_ to? (1) - rm (1)
- rmdir (1)
- setgid? (1)
- setuid? (1)
- sfork (1)
- shell (1)
- signaled? (1)
- signm (1)
- signo (1)
- size (1)
- size? (1)
- socket? (1)
- split (1)
-
start
_ job (1) - stat (1)
- status (1)
- sticky? (1)
- stime (1)
- stime= (1)
- stopped? (1)
- stopsig (1)
- success? (1)
- symlink (1)
- symlink? (1)
- system (1)
- tee (1)
-
terminate
_ job (1) - termsig (1)
- test (1)
-
to
_ i (1) -
to
_ s (1) - transact (1)
- truncate (1)
- unlink (1)
- utime (2)
- utime= (1)
-
wait
_ all _ jobs _ execution (1) -
waiting
_ job? (1) -
waiting
_ jobs (1) -
waiting
_ jobs _ exist? (1) -
world
_ readable? (1) -
world
_ writable? (1) - writable? (1)
-
writable
_ real? (1) - zero? (1)
検索結果
先頭5件
-
Shell
# process _ controller -> Shell :: ProcessController (18607.0) -
@todo
@todo -
Shell
# command _ processor -> Shell :: CommandProcessor (18604.0) -
@todo
@todo -
Gem
:: CommandManager # process _ args(args) -> () (18307.0) -
引数 args を処理して gem コマンドを実行するために必要な処理を行います。
引数 args を処理して gem コマンドを実行するために必要な処理を行います。
@param args コマンドラインから受け取った引数を指定します。 -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (18304.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます -
Process
:: Status # stopped? -> bool (9100.0) -
プロセスが現在停止(終了ではない)している場合に真を返します。 Process.#waitpid に Process::WUNTRACED フラグを設定した 場合にだけ真になりえます。
プロセスが現在停止(終了ではない)している場合に真を返します。
Process.#waitpid に Process::WUNTRACED フラグを設定した
場合にだけ真になりえます。 -
Process
:: Status # inspect -> String (9076.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
プロセスの状態を以下のフォーマットで返します。
: 正常終了のとき
#<Process::Status: pid=18262,exited(nnn)>
: シグナルによる停止のとき
#<Process::Status: pid=18262,stopped(SIGxxx=nnn)>
: シグナルによる終了のとき
#<Process::Status: pid=18262,signaled(SIGxxx=nnn)>
: コアダンプしたとき(このステータスの表示はシステムに依存します)
#<Process::Status: pid=1... -
Process
:: Status # >>(num) -> Integer (9022.0) -
self.to_i >> num と同じです。
self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99 -
Shell
:: ProcessController # kill _ job(signal , command) -> Integer (9022.0) -
指定されたコマンドにシグナルを送ります。
指定されたコマンドにシグナルを送ります。
@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。
@param command コマンドを指定します。
@see Process.#kill -
Process
:: Status # &(other) -> Integer (9004.0) -
self.to_i & other と同じです。 このメソッドは後方互換性のためにあります。
self.to_i & other と同じです。
このメソッドは後方互換性のためにあります。
@param other 自身との & 演算をしたい整数を指定します。 -
Process
:: Status # ==(other) -> bool (9004.0) -
同じステータスの場合に真を返します。
同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。 -
Process
:: Status # coredump? -> bool (9004.0) -
終了時にコアダンプしていたら真を返します。
終了時にコアダンプしていたら真を返します。
このメソッドは signaled? が真のときにしか意味を持ちません。
このメソッドはシステムに依存します。サポートしないプラットフォー
ムでは常に false を返します。 -
Process
:: Status # exited? -> bool (9004.0) -
プロセスが exit(2) などにより正常に終了した場合に、真を返します。 そうでない場合に false を返します。
プロセスが exit(2) などにより正常に終了した場合に、真を返します。
そうでない場合に false を返します。 -
Process
:: Status # exitstatus -> Integer | nil (9004.0) -
exited? が真の場合プロセスが返した終了ステータスの整数を、そ うでない場合は nil を返します。
exited? が真の場合プロセスが返した終了ステータスの整数を、そ
うでない場合は nil を返します。 -
Process
:: Status # pid -> Integer (9004.0) -
終了したプロセスのプロセス ID を返します。
終了したプロセスのプロセス ID を返します。 -
Process
:: Status # signaled? -> bool (9004.0) -
プロセスがハンドラを定義していないシグナルを受けて終了した場合に真 を返します。
プロセスがハンドラを定義していないシグナルを受けて終了した場合に真
を返します。 -
Process
:: Status # stopsig -> Integer | nil (9004.0) -
stopped? が真の場合そのシグナルの番号を、そうでない場合は nil を返します。
stopped? が真の場合そのシグナルの番号を、そうでない場合は
nil を返します。 -
Process
:: Status # success? -> bool (9004.0) -
プロセスの終了状態が成功である場合に true を返します。 そうでない場合に false を返します。
プロセスの終了状態が成功である場合に true を返します。
そうでない場合に false を返します。 -
Process
:: Status # termsig -> Integer | nil (9004.0) -
signaled? が真の場合プロセスを終了させたシグナル番号を、 そうでない場合は nil を返します。
signaled? が真の場合プロセスを終了させたシグナル番号を、
そうでない場合は nil を返します。 -
Process
:: Status # to _ i -> Integer (9004.0) -
C 言語での終了ステータス表現の整数を返します。
C 言語での終了ステータス表現の整数を返します。
多くのシステムの実装では、この値の上位 8 bit に exit(2)
に渡した終了ステータスが、下位 8 bit にシグナル等で終了した等の情
報が入っています。 -
Process
:: Status # to _ s -> String (9004.0) -
to_i.to_s と同じです。
to_i.to_s と同じです。 -
Process
:: Tms # cstime -> Float (9004.0) -
終了した子プロセスのシステム CPU 時間の合計(秒)を返します。
終了した子プロセスのシステム CPU 時間の合計(秒)を返します。
Windows 上では常に 0 を返します。 -
Process
:: Tms # cstime=(n) (9004.0) -
終了した子プロセスのシステム CPU 時間の合計(秒)をセットします。
終了した子プロセスのシステム CPU 時間の合計(秒)をセットします。 -
Process
:: Tms # cutime -> Float (9004.0) -
終了した子プロセスのユーザー CPU 時間の合計(秒)を返します。
終了した子プロセスのユーザー CPU 時間の合計(秒)を返します。
Windows 上では常に 0 を返します。 -
Process
:: Tms # cutime=(n) (9004.0) -
終了した子プロセスのユーザー CPU 時間の合計(秒)をセットします。
終了した子プロセスのユーザー CPU 時間の合計(秒)をセットします。 -
Process
:: Tms # stime -> Float (9004.0) -
システム CPU 時間を返します。
システム CPU 時間を返します。 -
Process
:: Tms # stime=(n) (9004.0) -
システム CPU 時間をセットします。
システム CPU 時間をセットします。 -
Process
:: Tms # utime -> Float (9004.0) -
ユーザー CPU 時間を返します。
ユーザー CPU 時間を返します。 -
Process
:: Tms # utime=(n) (9004.0) -
ユーザー CPU 時間をセットします。
ユーザー CPU 時間をセットします。 -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (9004.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 (9004.0) -
@todo
@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。 -
Shell
:: CommandProcessor # atime(filename) -> Time (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # blockdev?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (9004.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 (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
:: CommandProcessor # check _ point (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # ctime(filename) -> Time (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime -
Shell
:: CommandProcessor # delete(*filename) -> Integer (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # directory?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#directory? -
Shell
:: CommandProcessor # dirname(filename) -> String (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (9004.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 (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable? -
Shell
:: CommandProcessor # executable _ real?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real? -
Shell
:: CommandProcessor # exist?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # exists?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#exist? FileTest.#exists? -
Shell
:: CommandProcessor # expand _ path(path) -> String (9004.0) -
Fileクラスにある同名のクラスメソッドと同じです.
Fileクラスにある同名のクラスメソッドと同じです.
@param path ファイル名を表す文字列を指定します。
@see File.expand_path -
Shell
:: CommandProcessor # file?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file? -
Shell
:: CommandProcessor # find _ system _ command(command) (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # finish _ all _ jobs (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # foreach(path = nil , &block) -> () (9004.0) -
pathがファイルなら, File#foreach pathがディレクトリなら, Dir#foreach の動作をします。
pathがファイルなら, File#foreach
pathがディレクトリなら, Dir#foreach
の動作をします。
@param path ファイルもしくはディレクトリのパスを文字列で指定します。
使用例
require 'shell'
Shell.verbose = false
sh = Shell.new
sh.foreach("/tmp"){|f|
puts f
} -
Shell
:: CommandProcessor # ftype(filename) -> String (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.ftype -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (9004.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 # grpowned?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#grpowned? -
Shell
:: CommandProcessor # identical? (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # join(*item) -> String (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join -
Shell
:: CommandProcessor # link(old , new) -> 0 (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link -
Shell
:: CommandProcessor # lstat(filename) -> File :: Stat (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat -
Shell
:: CommandProcessor # mkdir(*path) -> Array (9004.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 (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime -
Shell
:: CommandProcessor # notify(*opts) { . . . } -> () (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # open(path , mode) -> File | Dir (9004.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) -> () (9004.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 # owned?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#owned? -
Shell
:: CommandProcessor # pipe?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#pipe? -
Shell
:: CommandProcessor # readable?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable? -
Shell
:: CommandProcessor # readable _ real?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real? -
Shell
:: CommandProcessor # readlink(path) -> String (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink -
Shell
:: CommandProcessor # rehash -> {} (9004.0) -
登録されているシステムコマンドの情報をクリアします。 通常、使うことはありません。
登録されているシステムコマンドの情報をクリアします。
通常、使うことはありません。 -
Shell
:: CommandProcessor # rename(from , to) -> 0 (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param from ファイルの名前を文字列で与えます。
@param to 新しいファイル名を文字列で与えます。
@see File.rename -
Shell
:: CommandProcessor # rm(*filename) -> Integer (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete -
Shell
:: CommandProcessor # rmdir(*path) -> () (9004.0) -
Dir.rmdirと同じです。 (複数可)
Dir.rmdirと同じです。 (複数可)
@param path 削除するディレクトリ名を文字列で指定します。 -
Shell
:: CommandProcessor # setgid?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setgid? -
Shell
:: CommandProcessor # setuid?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#setuid? -
Shell
:: CommandProcessor # size(file) -> Integer (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # size?(file) -> Integer | nil (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#size FileTest.#size? -
Shell
:: CommandProcessor # socket?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#socket? -
Shell
:: CommandProcessor # split(pathname) -> [String] (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param pathname パス名を表す文字列を指定します。
@see File.split -
Shell
:: CommandProcessor # stat(filename) -> File :: Stat (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.stat -
Shell
:: CommandProcessor # sticky?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#sticky? -
Shell
:: CommandProcessor # symlink(old , new) -> 0 (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new シンボリックリンクを表す文字列を指定します。
@see File.symlink -
Shell
:: CommandProcessor # symlink?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#symlink? -
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (9004.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 -
Shell
:: CommandProcessor # tee(file) -> Shell :: Filter (9004.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする 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) | tee(file + ".tee") >> "all... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (9004.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 # transact { . . . } -> object (9004.0) -
ブロック中で shell を self として実行します。
ブロック中で shell を self として実行します。
例:
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact{
system("ls", "-l") | head > STDOUT
# transact の中では、
# sh.system("ls", "-l") | sh.head > STDOUT と同じとなる。
} -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: CommandProcessor # unlink(path) -> self (9004.0) -
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
path がファイルなら File.unlink、path がディレクトリなら Dir.unlink の動作をします。
@param path 削除したいパスを指定します。
@see File.unlink, Dir.unlink -
Shell
:: CommandProcessor # utime(atime , mtime , *filename) -> Integer (9004.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime -
Shell
:: CommandProcessor # world _ readable? (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # world _ writable? (9004.0) -
@todo
@todo -
Shell
:: CommandProcessor # writable?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable? -
Shell
:: CommandProcessor # writable _ real?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real? -
Shell
:: CommandProcessor # zero?(file) -> bool (9004.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#zero? -
Shell
:: ProcessController # active _ job?(job) -> bool (9004.0) -
指定されたジョブが実行中である場合は真を返します。 そうでない場合は偽を返します。
指定されたジョブが実行中である場合は真を返します。
そうでない場合は偽を返します。
@param job ジョブを指定します。 -
Shell
:: ProcessController # active _ jobs -> Array (9004.0) -
実行中のジョブの配列を返します。
実行中のジョブの配列を返します。 -
Shell
:: ProcessController # active _ jobs _ exist? -> bool (9004.0) -
実行中のジョブが存在する場合は真を返します。 そうでない場合は偽を返します。
実行中のジョブが存在する場合は真を返します。
そうでない場合は偽を返します。 -
Shell
:: ProcessController # add _ schedule(command) -> () (9004.0) -
指定されたコマンドを待機ジョブとして登録します。 ただし、実行中のジョブが存在しない場合は、そのジョブを直ちに実行します。
指定されたコマンドを待機ジョブとして登録します。
ただし、実行中のジョブが存在しない場合は、そのジョブを直ちに実行します。
@param command コマンドを指定します。