52件ヒット
[1-52件を表示]
(0.061秒)
別のキーワード
検索結果
先頭5件
- Kernel
. # system(command , options={}) -> bool | nil - Kernel
. # system(env , command , options={}) -> bool | nil - Kernel
. # system(env , program , *args , options={}) -> bool | nil - Kernel
. # system(program , *args , options={}) -> bool | nil - Syslog
. # open!(ident= $ 0 , options=Syslog :: LOG _ PID|Syslog :: LOG _ CONS , facility=Syslog :: LOG _ USER) { |syslog| . . . } -> self
-
Kernel
. # system(command , options={}) -> bool | nil (18150.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...が失敗したときに発生します。
@raise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
/......tionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: true) # => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception:......true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18150.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...が失敗したときに発生します。
@raise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
/......tionオプションを指定][ruby]{
system("sad", exception: true) # => Errno::ENOENT (No such file or directory - sad)
system('ruby -e "exit(false)"', exception: true) # => RuntimeError (Command failed with exit 1: ruby -e "exit(false)")
system('ruby -e "exit(true)"', exception:......true) # => true
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18130.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...aise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (18130.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...aise RuntimeError exception: true が指定されていて、コマンドの終了ステータスが 0 以外のときに発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Syslog
. # open!(ident= $ 0 , options=Syslog :: LOG _ PID|Syslog :: LOG _ CONS , facility=Syslog :: LOG _ USER) { |syslog| . . . } -> self (19.0) -
開いていた syslog を最初にクローズする点を除いてSyslog.#open と同じです。
...log.open!("syslogtest2")
Syslog.log(Syslog::LOG_WARNING, "the sky is falling in %d seconds!", 200)
rescue RuntimeError => err
# RuntimeError は発生しない。
puts err
end
File.foreach('/var/log/system.log'){|line|
print line if line =~ /the sky is/
}
@see Syslog.#open... -
Syslog
. # reopen(ident= $ 0 , options=Syslog :: LOG _ PID|Syslog :: LOG _ CONS , facility=Syslog :: LOG _ USER) { |syslog| . . . } -> self (19.0) -
開いていた syslog を最初にクローズする点を除いてSyslog.#open と同じです。
...log.open!("syslogtest2")
Syslog.log(Syslog::LOG_WARNING, "the sky is falling in %d seconds!", 200)
rescue RuntimeError => err
# RuntimeError は発生しない。
puts err
end
File.foreach('/var/log/system.log'){|line|
print line if line =~ /the sky is/
}
@see Syslog.#open...