RosettaCodeData/Task/File-input-output/Stata/file-input-output.stata

15 lines
267 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
program copyfile
file open fin using `1', read text
file open fout using `2', write text replace
file read fin line
while !r(eof) {
file write fout `"`line'"' _newline
file read fin line
}
file close fin
file close fout
end
copyfile input.txt output.txt