ライブラリ
- ビルトイン (55)
-
rubygems
/ command (11) -
rubygems
/ command _ manager (11) - shell (12)
-
shell
/ command-processor (504) -
shell
/ process-controller (30)
クラス
-
Gem
:: Command (11) -
Gem
:: CommandManager (11) - Shell (12)
-
Shell
:: CommandProcessor (498) -
Shell
:: ProcessController (30)
キーワード
- CommandProcessor (6)
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) - NoDelegateMethods (6)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- [] (6)
-
add
_ delegate _ command _ to _ shell (6) -
add
_ schedule (6) -
alias
_ command (12) -
alias
_ map (6) - append (6)
- atime (6)
- basename (6)
- blockdev? (6)
- cat (6)
- chardev? (6)
-
check
_ point (6) - chmod (6)
- chown (6)
-
command
_ processor (6) - concat (6)
- ctime (6)
-
def
_ builtin _ commands (6) -
def
_ system _ command (6) - delete (6)
- directory? (6)
- dirname (6)
- echo (6)
- exec (11)
- executable? (6)
-
executable
_ real? (6) - exist? (6)
- exists? (6)
- file? (6)
-
find
_ system _ command (6) -
finish
_ all _ jobs (6) - foreach (6)
- ftype (6)
- glob (6)
- grpowned? (6)
- identical? (6)
- initialize (6)
-
install
_ builtin _ commands (6) -
install
_ system _ commands (6) - join (6)
-
kill
_ job (6) - link (6)
- lstat (6)
-
method
_ added (6) - mkdir (6)
- mtime (6)
- new (6)
- notify (6)
- open (6)
- out (6)
- owned? (6)
- pipe? (6)
-
process
_ args (11) - readable? (6)
-
readable
_ real? (6) - readlink (6)
- rehash (6)
- rename (6)
- rm (6)
- rmdir (6)
-
ruby 1
. 9 feature (11) -
run
_ config (6) - setgid? (6)
- setuid? (6)
- sfork (6)
-
shell
/ command-processor (6) - size (6)
- size? (6)
- socket? (6)
- split (6)
-
start
_ job (6) - stat (6)
- sticky? (6)
- symlink (6)
- symlink? (6)
- system (6)
- tee (6)
-
terminate
_ job (6) - test (6)
- transact (6)
- trap (44)
- truncate (6)
-
unalias
_ command (6) -
undef
_ system _ command (12) - unlink (6)
- utime (6)
-
when
_ invoked (11) -
world
_ readable? (6) -
world
_ writable? (6) - writable? (6)
-
writable
_ real? (6) - zero? (6)
検索結果
先頭5件
- Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand - Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil - Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil - Shell
:: CommandProcessor . alias _ map -> Hash - Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter
-
Shell
:: CommandProcessor # system(command , *opts) -> Shell :: SystemCommand (6235.0) -
command を実行する.
...
command を実行する.
@param command 実行するコマンドのパスを文字列で指定します。
@param opts command のオプションを文字列で指定します。複数可。
使用例:
require 'shell'
Shell.verbose = false
sh = Shell.new
print sh.system("ls", "-l")
S......hell.def_system_command("head")
sh.system("ls", "-l") | sh.head("-n 3") > STDOUT... -
Shell
:: CommandProcessor # [](command , file1 , file2 = nil) -> bool | Time | Integer | nil (6108.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para... -
Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil (6108.0) -
Kernel.#test や FileTest のメソッドに処理を委譲します。
...Kernel.#test や FileTest のメソッドに処理を委譲します。
@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。
@para... -
Shell
:: CommandProcessor . alias _ map -> Hash (6016.0) -
Shell::CommandProcessor.alias_command で定義したエイリアスの一覧を返します。
...Shell::CommandProcessor.alias_command で定義したエイリアスの一覧を返します。... -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (6006.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) | tee(... -
Shell
:: CommandProcessor # echo(*strings) -> Shell :: Filter (6006.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(fi... -
Shell
:: CommandProcessor # glob(pattern) -> Shell :: Filter (6006.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) | tee(f... -
Shell
:: CommandProcessor # out(dev = STDOUT , &block) -> () (6006.0) -
Shell#transact を呼び出しその結果を dev に出力します。
...ェクトなどで指定します。
@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 # tee(file) -> Shell :: Filter (6006.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) | tee(... -
Shell
:: CommandProcessor # transact { . . . } -> object (6006.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 # append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (6000.0) -
@todo
@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。 -
Shell
:: CommandProcessor # atime(filename) -> Time (6000.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime -
Shell
:: CommandProcessor # basename(filename , suffix = "") -> String (6000.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
@see File.basename -
Shell
:: CommandProcessor # blockdev?(file) -> bool (6000.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev? -
Shell
:: CommandProcessor # chardev?(file) -> bool (6000.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#chardev? -
Shell
:: CommandProcessor # check _ point (6000.0) -
@todo
@todo -
Shell
:: CommandProcessor # chmod(mode , *filename) -> Integer (6000.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param mode chmod(2) と同様に整数で指定します。
@see File.chmod -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (6000.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown