2件ヒット
[1-2件を表示]
(0.013秒)
検索結果
先頭2件
-
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (18355.0) -
与えられたパターンをファイルリストから grep のように検索します。
...attern 正規表現を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new('sample*')
file_list.eg... -
FileUtils
# sh(*cmd) {|result , status| . . . } (25.0) -
与えられたコマンドを実行します。
与えられたコマンドを実行します。
与えられた引数が複数の場合、シェルを経由しないでコマンドを実行します。
@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #...