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 04:35, 4 August 2021
, 2 years agoAdded UNIX Shell solution
m (→{{header|Julia}}: documentation) |
(Added UNIX Shell solution) |
||
Line 284:
done...
</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}}==
|