Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions

Add Factor
m (changed (draft) task requirements as it stated previously, one could interpret the wording as that the original file was to be overwritten with the lines/records in reverse order/)
(Add Factor)
Line 19:
Also, don't include the rightmost informative comments   (◄■■■■■■),   as they are not meant to be part of the file.
<br><br>
 
=={{header|Factor}}==
{{works with|Factor|0.99 2021-06-02}}
<lang factor>USING: io io.encodings.utf8 io.files sequences ;
 
"rodgers.txt" utf8 file-lines <reversed> [ print ] each</lang>
{{out}}
<pre>
--- Will Rodgers
 
until you can find a rock."
saying 'Nice Doggy'
"Diplomacy is the art of
</pre>
 
=={{header|Go}}==
1,808

edits