るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
67件ヒット [1-67件を表示] (0.082秒)
トップページ > バージョン:2.3.0[x] > クエリ:l[x] > クエリ:y[x] > ライブラリ:shell[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

検索結果

Shell.install_system_commands(pre = "sys_") -> () (45979.0)

system_path上にある全ての実行可能ファイルをShellに定義する. メソッ ド名は元のファイル名の頭にpreをつけたものとなる.

...イルをShellに定義する. メソッ
ド名は元のファイル名の頭にpreをつけたものとなる.

@param pre Shellに定義するメソッド名の先頭に付加される文字列を指定します。

使用例: ls -l | head -n 5 のような例。

require 'shell'
Shell
.install...
..._system_commands
sh = Shell.new
sh.verbose = false
sh.transact {
(sys_ls("-l") | sys_head("-n 5")).each {|l|
puts l
}
}...

Shell::CommandProcessor.install_system_commands(prefix = "sys_") -> () (45904.0)

全てのシステムコマンドをメソッドとして定義します。

全てのシステムコマンドをメソッドとして定義します。

既に定義されているコマンドを再定義することはありません。
デフォルトでは全てのコマンドに "sys_" というプレフィクスが付きます。
また、メソッド名として使用できない文字は全て "_" に置換してメソッドを定義します。
このメソッドの実行中に発生した例外は単に無視されます。

@param prefix プレフィクスを指定します。

Shell::ProcessController.block_output_synchronize { ... } -> () (45604.0)

@todo

@todo

Shell#symlink(old, new) -> 0 (36607.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param old ファイル名を表す文字列を指定します。

@param new シンボリックリンクを表す文字列を指定します。

@see File.symlink

Shell#symlink?(file) -> bool (36607.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#symlink?

絞り込み条件を変える

Shell.debug_output_try_lock -> bool (36607.0)

@todo

@todo

@see Thread::Mutex#try_lock

Shell.default_system_path -> Array (36607.0)

Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。

...
Shell
でもちいられるコマンドを検索する対象のパスを設定および、参照します。

@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。

動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [...
..."/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell
.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"...

Shell.default_system_path=(path) (36607.0)

Shellでもちいられるコマンドを検索する対象のパスを設定および、参照します。

...
Shell
でもちいられるコマンドを検索する対象のパスを設定および、参照します。

@param path Shellでもちいられるコマンドを検索する対象のパスを文字列で指定します。

動作例
require 'shell'
p Shell.default_system_path
# 例
#=> [...
..."/opt/local/bin", "/opt/local/sbin", "/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/X11/bin", "/Users/kouya/bin"]
Shell
.default_system_path = ENV["HOME"] + "/bin"
p Shell.default_system_path
# => "/Users/kouya/bin"...

Shell::CommandProcessor#symlink(old, new) -> 0 (36604.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param old ファイル名を表す文字列を指定します。

@param new シンボリックリンクを表す文字列を指定します。

@see File.symlink

Shell::CommandProcessor#symlink?(file) -> bool (36604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#symlink?

絞り込み条件を変える

Shell::Filter#symlink(old, new) -> 0 (36604.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param old ファイル名を表す文字列を指定します。

@param new シンボリックリンクを表す文字列を指定します。

@see File.symlink

Shell::Filter#symlink?(file) -> bool (36604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#symlink?

Shell::SystemCommand#kill(signal) -> Integer (36304.0)

自身のプロセスにシグナルを送ります。

自身のプロセスにシグナルを送ります。

@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。

@see Process.#kill

Shell::Error::CantApplyMethod (36004.0)

メソッドを適用できないときに発生する例外です。

メソッドを適用できないときに発生する例外です。

Shell#system(command, *opts) -> Shell::SystemCommand (27943.0)

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#system(command, *opts) -> Shell::SystemCommand (27940.0)

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::Filter#system(command, *opts) -> Shell::SystemCommand (27940.0)

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.def_system_command(command, path = command) -> nil (27697.0)

Shell のメソッドとして command を登録します.

...
Shell
のメソッドとして command を登録します.

OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.

@param command Shell のメソッド...
...ない場合はcommand と同じになります。

例)
require 'shell'
Shell
.def_system_command "ls"
# ls を定義

Shell
.def_system_command "sys_sort", "sort"
# sortコマンドをsys_sortとして定義

sh = Shell.new
sh.transact {
ls.each { |l|
puts l
}
(ls("-l...

Shell.undef_system_command(command) -> Shell::CommandProcessor (27661.0)

commandを削除します.

...mmand 削除するコマンドの文字列を指定します。

動作例:
require 'shell'
Shell
.def_system_command("ls")
# ls を定義
Shell
.undef_system_command("ls")
# ls を 削除

sh = Shell.new
begin
sh.transact {
ls("-l").each {|l|
puts l
}
}
r...

Shell#directory?(file) -> bool (27607.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@see FileTest.#directory?

絞り込み条件を変える

Shell#ftype(filename) -> String (27607.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列を指定します。

@see File.ftype

Shell#sticky?(file) -> bool (27607.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#sticky?

Shell::CommandProcessor#directory?(file) -> bool (27604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@see FileTest.#directory?

Shell::CommandProcessor#ftype(filename) -> String (27604.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列を指定します。

@see File.ftype

Shell::CommandProcessor#sticky?(file) -> bool (27604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#sticky?

絞り込み条件を変える

Shell::CommandProcessor.undef_system_command(command) -> self (27604.0)

与えられたコマンドを削除します。

与えられたコマンドを削除します。

@param command 削除したいコマンド名を指定します。

Shell::Filter#directory?(file) -> bool (27604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列か IO オブジェクトを指定します。

@see FileTest.#directory?

Shell::Filter#ftype(filename) -> String (27604.0)

File クラスにある同名のクラスメソッドと同じです.

File クラスにある同名のクラスメソッドと同じです.

@param filename ファイル名を表す文字列を指定します。

@see File.ftype

Shell::Filter#sticky?(file) -> bool (27604.0)

FileTest モジュールにある同名のクラスメソッドと同じです.

FileTest モジュールにある同名のクラスメソッドと同じです.

@param file ファイル名を表す文字列を指定します。

@see FileTest.#sticky?

Shellwords.#shelljoin(array) -> String (27604.0)

配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。

...スケープには、Shellwords.#shellescape と
同じ規則が適用されます。

@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連結した文字列を返します。

例:
require 'shellwords'

pattern =...
...'Jan 15'
file = 'file name with spaces'
puts Shellwords.shelljoin(['grep', pattern, file])
# => grep Jan\ 15 file\ name\ with\ spaces...

絞り込み条件を変える

Shell#find_system_command(command) (27307.0)

@todo

@todo

Shell#notify(*opts) { ... } -> () (27307.0)

@todo

@todo

Shell#system_path -> Array (27307.0)

コマンドサーチパスの配列を返す。

...コマンドサーチパスの配列を返す。

@param path コマンドサーチパスの配列を指定します。

使用例

require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]...

Shell#system_path=(path) (27307.0)

コマンドサーチパスの配列を返す。

...コマンドサーチパスの配列を返す。

@param path コマンドサーチパスの配列を指定します。

使用例

require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]...

Shell.debug_output_synchronize (27307.0)

@todo

@todo

@see Thread::Mutex#synchronize

絞り込み条件を変える

Shell.notify(*opts) {|message| ... } -> String (27307.0)

@todo

@todo

Array#shelljoin -> String (27304.0)

配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。

...スケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。

array.shelljoin は、Shellwords.shelljoin(array) と等価です。

@return エスケープ結果を連結した文字列を返します。
@see Shellwords.#shelljoin...

Shell::CommandProcessor#find_system_command(command) (27304.0)

@todo

@todo

Shell::CommandProcessor#notify(*opts) { ... } -> () (27304.0)

@todo

@todo

Shell::CommandProcessor.def_system_command(command, path = command) -> () (27304.0)

@todo

@todo

与えられたコマンドをメソッドとして定義します。

@param command 定義したいコマンドを指定します。

@param path command のパスを指定します。省略すると環境変数 PATH から command を探します。

絞り込み条件を変える

Shell::Filter#find_system_command(command) (27304.0)

@todo

@todo

Shell::Filter#notify(*opts) { ... } -> () (27304.0)

@todo

@todo

Shell::SystemCommand#flush -> () (27304.0)

@todo

@todo

Shell::SystemCommand#notify(*opts) -> String (27304.0)

@todo

...@todo

@param opts

@see Shell#notify...

Shell::SystemCommand#notify(*opts) {|message| ... } -> String (27304.0)

@todo

...@todo

@param opts

@see Shell#notify...

絞り込み条件を変える

Shell::Error::DirStackEmpty (27004.0)

空のディレクトリスタックから要素を取り出そうとしたときに発生する例外です。

空のディレクトリスタックから要素を取り出そうとしたときに発生する例外です。

Shell::SystemCommand (27004.0)

Shell::ProcessController#active_jobs -> Array (18304.0)

実行中のジョブの配列を返します。

実行中のジョブの配列を返します。

Shell::ProcessController#jobs -> Array (18304.0)

全てのジョブの配列を返します。

全てのジョブの配列を返します。

Shell::ProcessController#waiting_jobs -> Array (18304.0)

待機中のジョブを返します。

待機中のジョブを返します。

絞り込み条件を変える

Shell::SystemCommand#active? -> bool (18304.0)

@todo

@todo

Shell::SystemCommand#each(rs = nil) {|line| ... } (18304.0)

@todo

@todo

@param rs

Shell::SystemCommand#wait? -> bool (18304.0)

@todo

@todo

Shell::SystemCommand#command -> String (18004.0)

@todo

@todo

コマンド名を返します。

Shell::SystemCommand#input=(inp) (18004.0)

@todo

@todo

絞り込み条件を変える

Shell::SystemCommand#name -> String (18004.0)

@todo

@todo

コマンド名を返します。

Shell::SystemCommand#start -> () (18004.0)

@todo

@todo

Shell::SystemCommand#start_export (18004.0)

@todo

@todo

Shell::SystemCommand#start_import -> () (18004.0)

@todo

@todo

Shell::SystemCommand#super_each -> () (18004.0)

@todo

...@todo

Shell
::Filter#each です。...

絞り込み条件を変える

Shell::SystemCommand#terminate -> () (18004.0)

@todo

@todo

Shell::SystemCommand.new(sh, command, *opts) (18004.0)

@todo

@todo

@param sh

@param command

@param opts

Shell#jobs -> Array (9307.0)

スケジューリングされているjobの一覧を返します。

スケジューリングされているjobの一覧を返します。

Shell#mkdir(*path) -> Array (9307.0)

Dir.mkdirと同じです。 (複数可)

...ram path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...

Shell::CommandProcessor#mkdir(*path) -> Array (9304.0)

Dir.mkdirと同じです。 (複数可)

...ram path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...

絞り込み条件を変える

Shell::Filter#mkdir(*path) -> Array (9304.0)

Dir.mkdirと同じです。 (複数可)

...ram path 作成するディレクトリ名を文字列で指定します。

@return 作成するディレクトリの一覧の配列を返します。

使用例
require 'shell'
Shell
.verbose = false
sh = Shell.new
begin
p sh.mkdir("foo") #=> ["foo"]
rescue => err
puts err
end...

Shellwords.join(array) -> String (9304.0)

配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。

...を適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。

このメソッドは、Shellwords.#shelljoin の別名です。

@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ...