TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:8884] converting uppercase to lowercase
Hi,
On Fri, 1 Oct 1999, Carl Wilhelm Soderstrom wrote:
> #!/usr/bin/perl
> foreach $filename(@ARGV) {
> $newfilename = lc($filename);
> print "$filename -> $newfilename\n";
> rename ($filename, $newfilename);
> }
>
> how do I make it recurse the entire tree, tho; and convert the
> filenames?
> I tried 'find . -depth| mklc ' and 'find . -depth| mklc * ' but it
> gives me a 'broken pipe' error both times. so obviously the output is not
> getting from 'find' to 'mklc'.
Try:
while($filename<STDIN>) {
instead of:
foreach $filename(@ARGV) {
-Yaron
--