On 10/16/06, bill fumerola <[EMAIL PROTECTED]> wrote:
On Sun, Oct 15, 2006 at 01:06:31PM -0700, David Alexander wrote:
> #!/bin/bash
> BASE="$PWD"
> find "$PWD" -type d | while read dir ; do
>         cd "$dir"
>         if [ $(ls | grep "\.flac$" | wc -l) -gt 0 ]; then
>                 echo "$(date "+%T")  Processing: ${PWD#$BASE/}"
>                 metaflac --preserve-modtime --add-replay-gain *.flac
>         fi
> done

this will fail with many filenames.

find . -type f -name \*.flac -print0 | \
        xargs -0 metaflac --preserve-modtime --add-replaygain

This second script will not properly calculate album gain.  The first script does that, assuming each album is in its own directory.

Ben


_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to