diff options
Diffstat (limited to 'ipl/progs/upper.icn')
-rw-r--r-- | ipl/progs/upper.icn | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ipl/progs/upper.icn b/ipl/progs/upper.icn new file mode 100644 index 0000000..37d1cc7 --- /dev/null +++ b/ipl/progs/upper.icn @@ -0,0 +1,36 @@ +############################################################################ +# +# File: upper.icn +# +# Subject: Program to map file names to uppercase +# +# Author: Ralph E. Griswold +# +# Date: March 10, 1995 +# +############################################################################ +# +# This file is in the public domain. +# +############################################################################ +# +# This program maps the names of all files in the current directory to +# uppercase. +# +############################################################################ +# +# Requires: UNIX +# +############################################################################ + +procedure main() + local input, old, new + + input := open("ls", "p") + + while old := read(input) do { + new := map(old, &lcase, &ucase) + if new ~== old then rename(old, new) + } + +end |