Jump to content

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

Added 11l
m (→‎{{header|R}}: Syntax highlighting.)
(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!}}==
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.