• Re: stupid unix question

    From justin@justin.c@se.net to comp.sys.mac.system on Thursday, July 24, 2003 06:53:21
    From Newsgroup: comp.sys.mac.system

    In article <1058743116.861310@ok-corral.gunslinger.net>, Jeremy <jeremy@exit109.com> wrote:

    Heath Raftery <hraftery@myrealbox.com> wrote:

    chext () {
    local file newext
    newext=$1
    shift
    for file in $argv
    do
    mv $file $(echo $file(:r)).${newext#.}
    done
    }

    Call as: chext .jpg *

    Will that work in most shells with 5000 files? I'd be expecting a 'argument list too long' error. Or is that up to the command to decide?

    No, argument list length is up to the shell, not the command. The above is written for zsh, and will probably not work in any other shell.



    :-) or - you could use Graphic Converter, it will batch rename your
    files... drag-and-drop!


    j.
    --- Synchronet 3.18b-Win32 NewsLink 1.113