I often use grep in conjunction with "find" and "xargs". Check out xargs, it
might do exactly what you want or at least some of it.

On 8/4/06, Ken <[EMAIL PROTECTED]> wrote:
>
> I'm getting this error when it try to run your script:
> "find: /tmp/z: No such file or directory"
>
> and the command I'm running it with, not sure if this is right,
>
> find /home/www.site.com/members/  -name '*.mp3' -exec /tmp/z {} \;
>
> thanks again,
> -Ken
>
> On 8/3/06, Warren Toomey <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, Aug 03, 2006 at 06:29:12PM -0400, Ken wrote:
> > > such I've added code to re-encode mp3's as they are being uploaded,
> but
> > all
> > > for the existing mp3's, is it possible in the Linux shell to use maybe
> > grep
> > > or something to go though all the folders and re-encode every single
> mp3
> > one
> > > at a time using this command
> > >  lame -b 64 -f -m s SongName.mp3 stream_SongName.mp3
> >
> > Write a script called /tmp/z like this
> >
> > #!/bin/sh
> > infile=$1
> > dir=`dirname $infile`
> > base=`basename $infile`
> > outfile="$dir/stream_$base"
> > lame -b 64 -f -m s $infile $outfile
> >
> > Make it executable, and test it with a single input file.
> > Now apply it to the whole directory:
> >
> > find dir -name '*.mp3' -exec /tmp/z {} \;
> >
> > where dir is the top-level directory name.
> >
> > Cheers,
> >        Warren
> > _______________________________________________
> > mp3encoder mailing list
> > mp3encoder@minnie.tuhs.org
> > https://minnie.tuhs.org/mailman/listinfo/mp3encoder
> >
> _______________________________________________
> mp3encoder mailing list
> mp3encoder@minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/mp3encoder
>
_______________________________________________
mp3encoder mailing list
mp3encoder@minnie.tuhs.org
https://minnie.tuhs.org/mailman/listinfo/mp3encoder

Reply via email to