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

Added Quackery.
(Added Quackery.)
Line 629:
C:\My Projects\BGI>
</pre>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ sharefile drop
[] swap
[ carriage over find split
dup $ "" != while
behead drop
unrot nested swap join
swap again ]
drop nested swap join
witheach [ echo$ cr ] ] is task ( $ --> )
 
$ "rosetta/input.txt" task</syntaxhighlight>
 
{{out}}
 
<pre> --- Will Rodgers
until you can find a rock."
saying 'Nice Doggy'
"Diplomacy is the art of
</pre>
 
=={{header|R}}==
<syntaxhighlight lang="rsplus">text <- scan("Rodgers.txt", character(), sep = "\n")
1,462

edits