474件ヒット
[1-100件を表示]
(0.085秒)
種類
- インスタンスメソッド (378)
- 特異メソッド (96)
ライブラリ
- shell (474)
キーワード
- [] (6)
-
alias
_ command (6) - append (6)
- atime (6)
- basename (6)
- cascade (6)
- cascade= (6)
- cat (6)
- cd (12)
- chardev? (6)
- chdir (6)
- chmod (6)
- chown (6)
-
command
_ processor (6) - concat (6)
- ctime (6)
- debug= (12)
-
def
_ system _ command (6) -
default
_ record _ separator (6) -
default
_ record _ separator= (6) -
default
_ system _ path (6) -
default
_ system _ path= (6) - delete (6)
-
dir
_ stack (6) - dirname (6)
- dirs (6)
- echo (6)
- executable? (6)
-
executable
_ real? (6) -
find
_ system _ command (6) -
finish
_ all _ jobs (6) - foreach (6)
- ftype (6)
- glob (6)
- identical? (6)
-
install
_ system _ commands (6) - jobs (6)
- kill (6)
- lstat (6)
- mkdir (6)
- mtime (6)
- new (6)
- notify (6)
- open (6)
- pushd (6)
- pushdir (6)
- readable? (6)
-
readable
_ real? (6) - readlink (6)
-
record
_ separator (6) -
record
_ separator= (6) - rehash (6)
- rename (6)
- rm (6)
- rmdir (6)
- split (6)
- stat (6)
- system (6)
-
system
_ path (6) -
system
_ path= (6) - tee (6)
- test (6)
- transact (6)
- truncate (6)
- umask (6)
- umask= (6)
-
unalias
_ command (6) -
undef
_ system _ command (6) - unlink (6)
- utime (6)
- verbose= (12)
-
world
_ readable? (6) -
world
_ writable? (6) - writable? (6)
-
writable
_ real? (6)
検索結果
先頭5件
-
Shell
# append(to , filter) -> Shell :: AppendFile | Shell :: AppendIO (6301.0) -
@todo
...@todo
@param to 文字列か IO を指定します。
@param filter Shell::Filter のインスタンスを指定します。... -
Shell
. def _ system _ command(command , path = command) -> nil (6301.0) -
Shell のメソッドとして command を登録します.
...
Shell のメソッドとして command を登録します.
OS上のコマンドを実行するにはまず, Shellのメソッドとして定義します.
注) コマンドを定義しなくとも直接実行できる Shell#system コマンドもあります.
@param command Shell のメソッド......ドを文字列で指定します。
@param path command のパスを指定します。
指定しない場合は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") | sys_sort("-k 5")).each {|l|
puts l
}
}... -
Shell
. undef _ system _ command(command) -> Shell :: CommandProcessor (6301.0) -
commandを削除します.
...commandを削除します.
@param command 削除するコマンドの文字列を指定します。
動作例:
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
}
}
rescue NameError => err
puts err
end... -
Shell
. alias _ command(alias , command , *opts) { . . . } -> self (6207.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) -> () (6207.0) -
commandのaliasを削除します.
...mandのaliasを削除します.
@param alias 削除したいエイリアスの名前を文字列で指定します。
@raise NameError alias で指定したコマンドが無い場合に発生します。
使用例: ls -la | sort -k 5 のような例。
require 'shell'
Shell.def_system_comman......d("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
en... -
Shell
# command _ processor -> Shell :: CommandProcessor (6201.0) -
@todo
@todo -
Shell
# concat(*jobs) -> Shell :: Concat (6201.0) -
@todo
@todo -
Shell
# dirname(filename) -> String (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.dirname... -
Shell
# find _ system _ command(command) (6201.0) -
@todo
@todo -
Shell
# lstat(filename) -> File :: Stat (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.lstat... -
Shell
# stat(filename) -> File :: Stat (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@see File.stat... -
Shell
# system _ path=(path) (6201.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Shell
# truncate(path , length) -> 0 (6201.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate... -
Shell
# umask=(umask) (6201.0) -
@todo
@todo -
Shell
# cat(*files) -> Shell :: Filter (6107.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
...します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
e......cho(l) | tee(file + ".tee") >> "all.tee"
}
}
}... -
Shell
# atime(filename) -> Time (6101.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime... -
Shell
# basename(filename , suffix = "") -> String (6101.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き......'.' を含まない任意の文字列にマッチします。
@see File.basename...