Sha256: 3d768f19d6de99ce30c22d495baca304ab236e3a97f5daad565e7363b192b5f6
Contents?: true
Size: 427 Bytes
Versions: 17
Compression:
Stored size: 427 Bytes
Contents
#!/usr/bin/env ruby require "find" def do_cmd(cmd) system cmd status = $? raise "'#{cmd}' failed with #{status}" if !status.success? end files_dir_path = ARGV[0] output_file = ARGV[1] files = Find.find(files_dir_path).reject { |p| FileTest.directory?(p) || File.basename(p) == "log" } files.each_slice(20) do |files_to_concat| file_list = files_to_concat.join(' ') do_cmd "cat #{file_list} >> #{output_file}" end
Version data entries
17 entries across 17 versions & 1 rubygems