るりまサーチ

最速Rubyリファレンスマニュアル検索!
729件ヒット [601-700件を表示] (0.011秒)
トップページ > クラス:Shell[x]

ライブラリ

キーワード

検索結果

<< < ... 5 6 7 8 > >>

Shell.debug -> bool | Integer (1.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.debug=(val) (1.0)

デバッグ用のフラグを設定します。

デバッグ用のフラグを設定します。

@param val bool 値や整数値を指定します。詳細は下記を参照してください。

# debug: true -> normal debug
# debug: 1 -> eval definition debug
# debug: 2 -> detail inspect debug

Shell.debug? -> bool | Integer (1.0)

@todo

@todo

デバッグ用フラグを参照します。

Shell.debug_output_exclusive_unlock { ... } -> Mutex | nil (1.0)

@todo

@todo

@see Mutex#exclusive_unlock

Shell.debug_output_lock -> Mutex (1.0)

@todo

@todo

@see Mutex#lock
@todo

@see Thread::Mutex#lock

絞り込み条件を変える

Shell.debug_output_locked? -> bool (1.0)

@todo

@todo

@see Mutex#locked?
@todo

@see Thread::Mutex#locked?

Shell.debug_output_synchronize (1.0)

@todo

@todo

@see Mutex#synchronize
@todo

@see Thread::Mutex#synchronize

Shell.debug_output_try_lock -> bool (1.0)

@todo

@todo

@see Mutex#try_lock
@todo

@see Thread::Mutex#try_lock

Shell.debug_output_unlock -> Mutex | nil (1.0)

@todo

@todo

@see Mutex#unlock
@todo

@see Thread::Mutex#unlock

Shell.def_system_command(command, path = command) -> nil (1.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.default_record_separator -> String (1.0)

執筆者募集

...執筆者募集

Shell
で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま...

Shell.default_record_separator=(rs) (1.0)

執筆者募集

...執筆者募集

Shell
で用いられる入力レコードセパレータを表す文字列を設定および参照します。
なにも指定しない場合は$/ の値が用いられます。

@param rs Shell で用いられる入力レコードセパレータを表す文字列を指定しま...

Shell.default_system_path -> Array (1.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) (1.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.install_system_commands(pre = "sys_") -> () (1.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.new(pwd = Dir.pwd, umask = nil) -> Shell (1.0)

プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.

...プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShell
ブジェクトを生成します.

@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir....

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

@todo

@todo

Shell.unalias_command(alias) -> () (1.0)

commandのaliasを削除します.

...例。
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("...
<< < ... 5 6 7 8 > >>