C
Christopher Latif
I have two files, I want to swap the contents of the files in my
program, suggestions?
program, suggestions?
2006/12/14 said:I have two files, I want to swap the contents of the files in my
program, suggestions?
Robert said:Renaming with a third temp file name is the most efficient if you know
that no file handles are open on these files.
robert
How the code for that program going to look like?
How the code for that program going to look like?
a, b, ignored = ARGV
Hi --
You can also do:
a, b = *ARGV
(which I know you know but it's just another option for anyone who
doesn't want the extra variable
quite right. i've moved to the former because it's self doccumenting : a
crutch for my feeble mind and almost complete lack of doccumentation
skills!
quite right. i've moved to the former because it's self doccumenting : a
crutch for my feeble mind and almost complete lack of doccumentation skills!
Christopher said:I have two files, I want to swap the contents of the files in my
program, suggestions?
Hemant said:How abt:
require 'fileutils'
FileUtils.copy_file("a.exe","b.exe")
FileUtils.mv "a.exe.stackdump","a.exe"
FileUtils.mv "b.exe","a.exe.stackdump"
what's stackdump?
Shiwei said:Got to see this topic just now. I do agree with Tom's opinion.
Shiwei
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.