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

15 lines
267 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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