moving upper case names to lower case

John Mundt john at chinet.chi.il.us
Wed Aug 23 01:58:53 AEST 1989


In article <20672 at adm.BRL.MIL> Leisner.Henr at xerox.com (Marty) writes:
>I'm looking for a good, clean way to move files from upper case names to lower case names.
>
>i.e. FOO.C to foo.c
>
>I could always right a C program, but there gotta be a better way.
>

#include <stdio.h>
#include <ctype.h>

main()
{
	register int c;
	while ((c = getchar()) != EOF)
		putchar(tolower(c));
}

It's easier to write and compile this than to get tr to massage
the string for you.  
-- 
---------------------
John Mundt   Teachers' Aide, Inc.  P.O. Box 1666  Highland Park, IL
john at chinet.chi.il.us
(312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem  



More information about the Comp.unix.questions mailing list