Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/File-input-output/Stata/file-input-output.stata
Normal file
14
Task/File-input-output/Stata/file-input-output.stata
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue