blob: a1b06747853534aef1eef5e481c3c00d47ce2f2a (
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
32
33
34
35
36
|
############################################################################
#
# File: lower.icn
#
# Subject: Program to map file names to lowercase
#
# Author: Ralph E. Griswold
#
# Date: January 6, 1995
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program maps the names of all files in the current directory to
# lowercase.
#
############################################################################
#
# Requires: UNIX
#
############################################################################
procedure main()
local input, old, new
input := open("ls", "p")
while old := read(input) do {
new := map(old)
if new ~== old then rename(old, new)
}
end
|