Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Content added Content deleted
m (→{{header|Julia}}: documentation) |
(Added UNIX Shell solution) |
||
Line 284: | Line 284: | ||
done... |
done... |
||
</pre> |
</pre> |
||
=={{header|UNIX Shell}}== |
|||
{{works with|Bourne Again SHell}} |
|||
<lang bash>tac rodgers.txt</lang> |
|||
Output: |
|||
<pre> |
|||
--- Will Rodgers |
|||
until you can find a rock." |
|||
saying 'Nice Doggy' |
|||
"Diplomacy is the art of |
|||
</pre> |
|||
Notice that '''tac''' is '''cat''' in reverse order. |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |