In the last episode (Jan 05), Jeff Laine said: > My goal is to rename several files in such a way as to decapitalize > starting letters in their names. The solution seems to be simple but > I'm stuck. What should I use? awk/sed or write some shell-script?
Best way is with ports/misc/mmv: mmv "?*" "=l1=2" If you use zsh, you can use the zmv function to do the same thing: autoload -U zmv zmv '([A-Z])(*)' '${(L)1}$2' Both of the above will detect filename collisions and tell you what won't work. If you know there aren't any collisions, you could do this (zsh again): for i in [A-Z]* ; do mv $i ${i[1]:l}${i[2,-1]} done -- Dan Nelson [EMAIL PROTECTED] _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"