種類
- インスタンスメソッド (1329)
- 特異メソッド (204)
- モジュール関数 (44)
- 定数 (12)
クラス
- Array (11)
- Shell (483)
-
Shell
:: BuiltInCommand (12) -
Shell
:: CommandProcessor (390) -
Shell
:: Filter (426) -
Shell
:: ProcessController (108) -
Shell
:: SystemCommand (54) -
Shell
:: Void (6) - String (22)
モジュール
- Shellwords (77)
キーワード
- < (6)
- >> (6)
- NoDelegateMethods (6)
-
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (6) - [] (18)
- activate (6)
- active? (12)
-
active
_ job? (6) -
active
_ jobs (6) -
active
_ jobs _ exist? (6) -
active
_ process _ controllers (6) -
alias
_ command (18) -
alias
_ map (6) - append (18)
- atime (18)
- basename (18)
-
block
_ output _ synchronize (6) - blockdev? (18)
- cat (18)
- cd (6)
- chardev? (18)
- chdir (6)
- chmod (18)
- chown (18)
- command (6)
- concat (6)
- ctime (18)
- cwd (6)
- debug (12)
- debug? (12)
-
debug
_ output _ exclusive _ unlock (3) -
debug
_ output _ unlock (6) -
def
_ builtin _ commands (6) -
def
_ system _ command (6) -
default
_ record _ separator (6) - delete (18)
- dir (6)
-
dir
_ stack (6) - directory? (18)
- dirname (18)
- dirs (6)
- each (12)
-
each
_ active _ object (6) - echo (18)
- escape (11)
- executable? (18)
-
executable
_ real? (18) - exist? (18)
- exists? (18)
- file? (18)
- foreach (18)
- ftype (18)
- getwd (6)
- glob (18)
- grpowned? (18)
- inactivate (6)
- initialize (6)
- input (6)
- inspect (6)
-
install
_ builtin _ commands (6) -
install
_ system _ commands (12) -
jobs
_ exist? (6) - join (29)
- kill (12)
-
kill
_ job (6) - link (18)
- lstat (18)
- mkdir (18)
- mtime (18)
- name (6)
- new (12)
- notify (36)
- open (18)
- out (6)
- owned? (18)
- pipe? (18)
- popdir (6)
-
process
_ controllers _ exclusive (6) - pushd (6)
- pushdir (6)
- pwd (6)
- readable? (18)
-
readable
_ real? (18) - readlink (18)
-
record
_ separator (6) - rehash (6)
- rename (6)
- rm (18)
- rmdir (18)
-
run
_ config (6) - setgid? (18)
- setuid? (18)
- sfork (6)
- shellescape (22)
- shelljoin (22)
- shellsplit (22)
- shellwords (11)
- size (18)
- size? (18)
- socket? (18)
- split (29)
-
start
_ import (6) - stat (18)
- sticky? (18)
- symlink (18)
- symlink? (18)
- system (6)
- tee (18)
- terminate (6)
- test (18)
-
to
_ a (6) -
to
_ s (6) - transact (6)
- truncate (6)
-
unalias
_ command (12) - unlink (18)
- utime (18)
- wait? (12)
-
wait
_ all _ jobs _ execution (6) -
wait
_ to _ finish _ all _ process _ controllers (6) -
waiting
_ job? (6) -
waiting
_ jobs (6) -
waiting
_ jobs _ exist? (6) - writable? (18)
-
writable
_ real? (18) - zero? (18)
- | (6)
検索結果
先頭5件
-
Shell
:: Filter # >(to) -> self (21113.0) -
toをフィルタの出力とする。 toが, 文字列ならばファイルに, IOオブジェクトであれ ばそれをそのまま出力とする。
...ルに, IOオブジェクトであれ
ばそれをそのまま出力とする。
@param to 出力先を指定します。文字列ならばファイルに,IOオブジェクトならばそれに出力します。
使用例
require 'shell'
Shell.def_system_command("tail")
sh = Shell.new
sh.t......ransact {
(sh.tail("-n 3") < "/etc/passwd") > File.open("tail.out", "w")
#(sh.tail("-n 3") < "/etc/passwd") > "tail.out" # と同じ.
}... -
Shell
:: CommandProcessor . install _ builtin _ commands -> () (12301.0) -
ビルトインコマンドを定義します。
ビルトインコマンドを定義します。 -
Shell
:: Filter # file?(file) -> bool (9301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file?... -
Shell
:: Filter # >>(to) -> self (9101.0) -
toをフィルタに追加する。 toが, 文字列ならばファイルに, IOオブジェクトであれば それをそのまま出力とする。
...ルに, IOオブジェクトであれば
それをそのまま出力とする。
@param to 出力先を指定します。文字列ならばファイルに、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("tail.out", "w") # でも同じ。
}... -
Shell
# utime(atime , mtime , *filename) -> Integer (6402.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
:: CommandProcessor # utime(atime , mtime , *filename) -> Integer (6401.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
:: Filter # utime(atime , mtime , *filename) -> Integer (6401.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
# atime(filename) -> Time (6302.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime... -
Shell
# ctime(filename) -> Time (6302.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Shell
# file?(file) -> bool (6302.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file?... -
Shell
# join(*item) -> String (6302.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
# mtime(filename) -> Time (6302.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime... -
Shell
# readlink(path) -> String (6302.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param path シンボリックリンクを表す文字列を指定します。
@see File.readlink... -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (6302.0) -
コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
...コマンドの別名(エイリアス)を作成します。
コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
@param alias エイリアスの名前を文字列で指定します.
@param command コマンド名を文字列で指定します.
@param......ンを指定します.
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_command("ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}... -
Shell
. unalias _ command(alias) -> () (6302.0) -
commandのaliasを削除します.
...commandのaliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError alias で指定したコマンドが無い場合に発生します。
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_co......and("ls")
Shell.alias_command("lsla", "ls", "-a", "-l")
Shell.def_system_command("sort")
sh = Shell.new
sh.transact {
(lsla | sort("-k 5")).each {|l|
puts l
}
}
Shell.unalias_command("lsla")
begin
Shell.unalias_command("lsla")
rescue NameError => err
puts err... -
Array
# shelljoin -> String (6301.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...スケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
array.shelljoin は、Shellwords.shelljoin(array) と等価です。
@return エスケープ結果を連結した文字列を返します。
@see Shellwords.#shelljoin...