blob: d111bc749b4dfd2c408110a53ddd3143af1ffdb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
############################################################################
#
# File: revfile.icn
#
# Subject: Program to reverse the order of lines in a file
#
# Author: Ralph E. Griswold
#
# Date: August 11, 1999
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program reverses the order of lines in a file. Beware of large
# files.
#
############################################################################
procedure main()
local lines
lines := []
every push(lines, !&input)
every write(!lines)
end
|