19件ヒット
[1-19件を表示]
(0.030秒)
クラス
- Shell (7)
-
Shell
:: AppendFile (1) -
Shell
:: AppendIO (1) -
Shell
:: Cat (1) -
Shell
:: CommandProcessor (1) -
Shell
:: Concat (1) -
Shell
:: Echo (1) -
Shell
:: Filter (1) -
Shell
:: Glob (1) -
Shell
:: ProcessController (1) -
Shell
:: SystemCommand (1) -
Shell
:: Tee (1) -
Shell
:: Void (1)
キーワード
-
alias
_ command (1) - cd (1)
-
def
_ system _ command (1) -
install
_ system _ commands (1) -
unalias
_ command (1) -
undef
_ system _ command (1)
検索結果
先頭5件
-
Shell
. new(pwd = Dir . pwd , umask = nil) -> Shell (54313.0) -
プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ ブジェクトを生成します.
...プロセスのカレントディレクトリをpwd で指定されたディレクトリとするShellオ
ブジェクトを生成します.
@param pwd プロセスのカレントディレクトリをpwd で指定されたディレクトリとします。
指定しない場合は、Dir.... -
Shell
:: AppendFile . new(sh , filename) (54310.0) -
@todo
@todo -
Shell
:: AppendIO . new(sh , filename) (54310.0) -
@todo
@todo -
Shell
:: Cat . new(sh , *filenames) (54310.0) -
@todo
@todo -
Shell
:: CommandProcessor . new(shell) (54310.0) -
@todo
@todo -
Shell
:: Concat . new(sh , *jobs) (54310.0) -
@todo
@todo -
Shell
:: Echo . new(sh , *strings) (54310.0) -
@todo
@todo -
Shell
:: Filter . new(sh) -> Shell :: Filter (54310.0) -
Shell::Filter クラスのインスタンスを返します。 通常このメソッドを直接使う機会は少ないでしょう。
...
Shell::Filter クラスのインスタンスを返します。
通常このメソッドを直接使う機会は少ないでしょう。... -
Shell
:: Glob . new(sh , pattern) (54310.0) -
@todo
@todo -
Shell
:: ProcessController . new(shell) (54310.0) -
自身を初期化します。
...自身を初期化します。
@param shell Shell のインスタンスを指定します。... -
Shell
:: SystemCommand . new(sh , command , *opts) (54310.0) -
@todo
@todo
@param sh
@param command
@param opts -
Shell
:: Tee . new(sh , filename) (54310.0) -
@todo
@todo -
Shell
:: Void . new(sh , *opts) (54310.0) -
-
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (28.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
. cd(path = nil , verbose = self . verbose) -> self (28.0) -
pathをカレントディレクトリとするShellオブジェクトを生成します.
...クトリとするShellオブジェクトを生成します.
@param path カレントディレクトリとするディレクトリを文字列で指定します。
@param verbose true を指定すると冗長な出力を行います。
使用例
require 'shell'
sh = Shell.new
sh.cd("/tmp")... -
Shell
. def _ system _ command(command , path = command) -> nil (28.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
. install _ system _ commands(pre = "sys _ ") -> () (28.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
. unalias _ command(alias) -> () (28.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("... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (28.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...