[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash script to convert, compress



Rob Owens <rowens@ptd.net> wrote:
> $(basename $file wav)ogg

If you've got bash or some other suitable shell you can do this same
thing without resorting to a subprocess:

    W=/some/path/to/wavmusic.wav
    echo $(basename "$W" wav)ogg
    wavmusic.ogg

    echo "${W/%wav/ogg}"
    /some/path/to/wavmusic.ogg

Chris


Reply to: