Directory rename
Ralph Thaller
ralph.thaller at gmail.com
Fri Nov 24 21:56:36 UTC 2006
thank you very much Alex!
It works perfect :)
2006/11/24, Alex Janssen <alex at ourwoods.org>:
>
> Here's a version with some usage help:
>
> # rename2titlecase.sh - rename files to Title Case - 11/24/2006 Alex P.
> Janssen Jr.
> if [ $# = 0 ]
> then
> echo -e "\
> usage: $0 filename ...
> Wild cards * and ? may be used if preceded with \ to escape shell
> expansion.
> Or, enclose your wild carded filenames in doublequotes \"fn*\""
> fi
>
> TMPFILE="/tmp/titlecase$$"
> ls $@ >$TMPFILE
> awk '{
> ORS="";
> x1=split($0,a1);
> print("mv \"" $0 "\" \"");
> for (SX in a1) {
> print(toupper(substr(a1[SX],1,1)) tolower(substr(a1[SX],2)) );
> if(--x1>0)
> print(" ")
> }
> print("\"\n")
> }' $TMPFILE
> rm -f $TMPFILE
> exit 0
>
>
> That's All Folks!
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061124/dc4fe9eb/attachment.html>
More information about the ubuntu-users
mailing list