Created
March 29, 2011 18:37
-
-
Save ebot/892960 to your computer and use it in GitHub Desktop.
Fix Patient Num
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
input = File.new 'input.txt' | |
output = File.new 'output.txt', 'w' | |
input.each_line do |line| | |
account = line.split '-' | |
puts " #{"%011d" % account[0]}#{account[1]}" | |
output << " #{"%011d" % account[0]}#{account[1]}" | |
end | |
input.close | |
output.close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment