1
0
Fork 0
lrthw/exercises/ex17/ex17.rb

15 lines
381 B
Ruby

from_file, to_file = ARGV
PAD = 5
str = "#{" " * PAD}Copying from #{from_file} to #{to_file}#{" " * PAD}"
puts "\e[48;5;139;233;253m#{" " * str.length}\e[0m"
puts "\e[48;5;139;233;253m#{str}\e[0m"
puts "\e[48;5;139;233;253m#{" " * str.length}\e[0m"
in_file = open(from_file)
indata = in_file.read
out_file = open(to_file, "w")
out_file.write(indata)
out_file.close
in_file.close