Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Reverse the order of lines in a text file while preserving the contents of each line (view source)
Revision as of 20:48, 3 August 2021
, 2 years ago→{{header|Factor}}: nvm
m (→{{header|Factor}}: Make more robust by handling possible trailing newline) |
m (→{{header|Factor}}: nvm) |
||
Line 24:
<lang factor>USING: io io.encodings.utf8 io.files sequences ;
"rodgers.txt" utf8 file-lines
{{out}}
<pre>
--- Will Rodgers
until you can find a rock."
saying 'Nice Doggy'
|