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|R}}: Syntax highlighting.)
(Added 11l)
Line 21: Line 21:


Reference: [https://linuxhint.com/bash_tac_command/ Bash tac command]
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!}}==
=={{header|Action!}}==