jnstq (owner)

Revisions

gist: 107470 Download_button fork
public
Public Clone URL: git://gist.github.com/107470.git
Embed All Files: show embed
snippet.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'rubygems'
require 'pathname'
 
dirname = Pathname.new("/Users/jon/Dropbox/Equipe Windows Server/trans")
 
File.open("/Users/jon/tmp/kvitto-0224-0303.txt", "w") do |output|
 
  %w(4548 4550 4551 4552 4555 4556 4557 4558 4559 4560 4562 4565 4566 4567 4568 4569 4570 4572 4573 4574 4575 4576 4579 4580 4581 4583 4584 4585 4587 4588).each do |tran_id|
    if dirname.join("#{tran_id}.txt").exist?
      output.puts File.open(dirname.join("#{tran_id}.txt")).read if dirname.join("#{tran_id}.txt").exist?
      output.puts ""
    else
      puts "finns inte #{tran_id}"
    end
  end
 
end