Directory rename

Ralph Thaller ralph.thaller at gmail.com
Fri Nov 24 08:50:06 UTC 2006


2006/11/24, Alex Janssen <alex at ourwoods.org>:
>
>  Alex Janssen said the following on 11/24/2006 12:48 AM:
>
>
> # rename files to Title Case
> FLIST=`ls`
> for FNAME in $FLIST
> do
>   NEWNAME=`echo $FNAME | awk '{print toupper(substr($1,1,1))
> tolower(substr($1,2))}'`
>   echo "mv $FNAME $NEWNAME"
> done
>
>  Please note that the above script does not work for filenames with spaces
> in them.
>
> Alex
>
> --
> Ourwoods.org
> Charlottesville, Virginia
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



mhm thx for this script!
But i get a a wrong output:
i have a structur looks like this:
pc  pc__8_3

when i run your script in this director i only get this:
mv pc P
mv pc__8_3 P

Ralph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061124/f521af83/attachment.html>


More information about the ubuntu-users mailing list