Date: Sat, 06 Jan 2018 12:44:40 +0100 From: "Michael Ross" <gmx@ross.cx> To: Polytropon <freebsd@edvax.de>, "Victor Sudakov" <vas@mpeks.tomsk.su> Cc: freebsd-questions@freebsd.org Subject: Re: Convert .flac and .ape to mp3 Message-ID: <op.zce38vcag7njmm@workstation> In-Reply-To: <20180106063934.GA32231@admin.sibptus.transneft.ru> References: <20180104163421.GA15692@admin.sibptus.transneft.ru> <20180104175156.440fa0c2.freebsd@edvax.de> <20180106063934.GA32231@admin.sibptus.transneft.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Am .01.2018, 07:39 Uhr, schrieb Victor Sudakov <vas@mpeks.tomsk.su>: > So eventually I will need to write a script to process all the *.ape > files, probably with bchunk. Which brings the following question. If > the file and directory names have spaces in them, a simple loop like > this: > > #!/bin/sh > for i in `find . -iname '*.ape'` > do > do_something $i > done > > breaks on spaces. > > What is the sh magic to handle such filenames? > xargs, you may want to run a few conversions in parallel: find . -iname '*.ape' -print0 | xargs -0 -I% -P<parallel_runs> convert % %.mp3 -- Michael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.zce38vcag7njmm>