Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Content added Content deleted
(Initial Haskell version.) |
(J) |
||
Line 364:
"Diplomacy is the art of
</pre>
=={{header|J}}==
<lang J> ;|.<;.2 text
--- Will Rodgers
until you can find a rock."
saying 'Nice Doggy'
"Diplomacy is the art of</lang>
where
<lang J>text=: {{)n
"Diplomacy is the art of
saying 'Nice Doggy'
until you can find a rock."
--- Will Rodgers
}}</lang>
or <lang J>text=: fread 'filename'</lang> if the text were stored in a file named <code>filename</code>.
=={{header|jq}}==
|