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 23:57, 11 January 2022
, 2 years agoAdded 11l
ReeceGoding (talk | contribs) m (→{{header|R}}: Syntax highlighting.) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 21:
Reference: [https://linuxhint.com/bash_tac_command/ Bash tac command]
=={{header|11l}}==
{{trans|Python}}
<lang 11l>:start:
V fileData = File(:argv[1]).read().split("\n")
L(line) reversed(fileData)
print(line)</lang>
=={{header|Action!}}==
|