Path: utzoo!utgpu!cs.utexas.edu!uunet!clyde.concordia.ca!IRO.UMontreal.CA!pinard From: pinard@IRO.UMontreal.CA (Francois Pinard) Newsgroups: alt.sources Subject: Re: Neat utility to convert uppercase filenames Message-ID: Date: 10 Dec 90 23:43:26 GMT References: <76@gdx.UUCP> Sender: news@IRO.UMontreal.CA Organization: Universite' de Montre'al Lines: 23 In-Reply-To: jay@gdx.UUCP's message of 7 Dec 90 18:39:51 GMT In article <76@gdx.UUCP> jay@gdx.UUCP (Jay A. Snyder) writes: Did you ever do mget from simtel20 or ymodem batch downloads from an MSDOS BBS, and get a lot of uppercase files in your directory? Well this is a utility that will take all specified files and convert them to lower case. I use this: #!/bin/sh # Convert upper case in file names to lower case. # Copyright (C) 1990 Free Software Foundation, Inc. # Francois Pinard , October 1990. echo $* \ | tr " " "\012" \ | gawk '{ if ($1 != tolower($1)) { print "mv", $1, tolower($1) } }' \ | sh I'm sure there is a one-liner in Perl to do the same :-). -- Franc,ois Pinard ``Vivement GNU!'' pinard@iro.umontreal.ca (514) 588-4656 cp 886 L'Epiphanie (Qc) J0K 1J0 ...!uunet!iros1!pinard