catsquotl wrote:
. The space between perl and -e did some of it however mv is still missing a file argument.
OK then. I've put a short script at the bottom of this message that will do what you want - it's not as short and sweet as other solutions, but it does the job. Just save it and make it executable, then call it with the directory which contains the files you want to rename as an arguement, for example: lowerren /home/chris/test to rename the files in /home/chris/test after saving the script as lowerren. Note that this will rename *all* files to *completely* lowercase, not just ones beginning with 'F'.
I copied all files to my hard disk and did a chmod755 to all of them in order to have the propper permissions.
Hope this is useful, Chris --- script starts here --- #!/usr/bin/perl if ($ARGV[0] ne "") { # If a directory is specified, use that $rendir = $ARGV[0]; if ($rendir !~ //$/) { # If there's no trailing slash $rendir = $rendir . "/"; # put one in } } opendir (RENDIR, "$rendir") || die ("Cannot open directory $rendir\n"); print "Renaming files in $rendir to their lowercase equivalents.\n"; until (($file = readdir(RENDIR)) eq "") { $lfile = lc($file); if ($file ne $lfile) { print "Moving ", $file, " to ", $lfile, ".\n"; `mv $file $lfile`; } } closedir (RENDIR); --- script stops here --- -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\ /__/ / _ / // /\ / / ICQ# 22219005 __v __/_/_//_/_,_/ /_/_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/