種類
- インスタンスメソッド (510)
- 特異メソッド (117)
ライブラリ
- shell (627)
キーワード
- [] (6)
-
alias
_ command (6) - append (6)
- atime (6)
- basename (6)
- blockdev? (6)
- cascade (6)
- cat (6)
- cd (12)
- chardev? (6)
- chdir (6)
- chmod (6)
- chown (6)
-
command
_ processor (6) - concat (6)
- ctime (6)
- cwd (6)
- debug (12)
- debug? (12)
-
debug
_ output _ exclusive _ unlock (3) -
debug
_ output _ lock (6) -
debug
_ output _ locked? (6) -
debug
_ output _ try _ lock (6) -
debug
_ output _ unlock (6) -
def
_ system _ command (6) -
default
_ record _ separator (6) -
default
_ system _ path (6) - delete (6)
- dir (6)
-
dir
_ stack (6) - directory? (6)
- dirname (6)
- dirs (6)
- echo (6)
- executable? (6)
-
executable
_ real? (6) - exist? (6)
- exists? (6)
- file? (6)
- foreach (6)
- ftype (6)
- getwd (6)
- glob (6)
- grpowned? (6)
-
install
_ system _ commands (6) - jobs (6)
- join (6)
- kill (6)
- link (6)
- lstat (6)
- mkdir (6)
- mtime (6)
- new (6)
- notify (12)
- open (6)
- out (6)
- owned? (6)
- pipe? (6)
- popd (6)
- popdir (6)
-
process
_ controller (6) - pushd (6)
- pushdir (6)
- pwd (6)
- readable? (6)
-
readable
_ real? (6) - readlink (6)
-
record
_ separator (6) - rehash (6)
- rename (6)
- rm (6)
- rmdir (6)
- setgid? (6)
- setuid? (6)
- size (6)
- size? (6)
- socket? (6)
- split (6)
- stat (6)
- sticky? (6)
- symlink (6)
- symlink? (6)
- system (6)
-
system
_ path (6) - tee (6)
- test (6)
- transact (6)
- truncate (6)
- umask (6)
-
unalias
_ command (6) -
undef
_ system _ command (6) - unlink (6)
- utime (6)
- verbose (12)
- verbose? (12)
- writable? (6)
-
writable
_ real? (6) - zero? (6)
検索結果
先頭5件
-
Shell
# process _ controller -> Shell :: ProcessController (9401.0) -
@todo
@todo -
Shell
. install _ system _ commands(pre = "sys _ ") -> () (9225.0) -
system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.
...をShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.
@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。
使用例: ls -l | head -n 5 のような例。
require 'shell'
Shell.install_syste......m_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}... -
Shell
# kill(signal , job) -> Integer (9201.0) -
@todo
...@todo
ジョブにシグナルを送ります。
@param signal
@param job... -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (6319.0) -
コマンドの別名(エイリアス)を作成します。 コマンドが無い場合は、Shell.def_system_command などであらかじめ作成します.
...Shell.def_system_command などであらかじめ作成します.
@param alias エイリアスの名前を文字列で指定します.
@param command コマンド名を文字列で指定します.
@param opts command で指定したコマンドのオプションを指定します.
使用例: 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) -> () (6319.0) -
commandのaliasを削除します.
...aliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError alias で指定したコマンドが無い場合に発生します。
使用例: 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("lsla")
begin
Shell.unalias_command("lsla")
rescue NameError => err
puts err
end... -
Shell
# delete(*filename) -> Integer (6301.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.delete... -
Shell
# executable?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable?... -
Shell
# executable _ real?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#executable_real?... -
Shell
# file?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#file?... -
Shell
# readable?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable?... -
Shell
# readable _ real?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#readable_real?... -
Shell
# writable?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable?... -
Shell
# writable _ real?(file) -> bool (6301.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列を指定します。
@see FileTest.#writable_real?... -
Shell
# glob(pattern) -> Shell :: Filter (6213.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...Filter オブジェクトを返します.
@param pattern シェルコマンド glob に与えるパターンを指定します。
パターンの書式については、Dir.[] を参照してください。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.n......ew
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "all.tee"
}
}
}
@see Dir.[]... -
Shell
# blockdev?(file) -> bool (6201.0) -
FileTest モジュールにある同名のクラスメソッドと同じです.
...FileTest モジュールにある同名のクラスメソッドと同じです.
@param file ファイル名を表す文字列か IO オブジェクトを指定します。
@see FileTest.#blockdev?... -
Shell
# link(old , new) -> 0 (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param old ファイル名を表す文字列を指定します。
@param new ファイル名を表す文字列を指定します。
@see File.link... -
Shell
# lstat(filename) -> File :: Stat (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat...