On 21/12/2007, Ian Darwin <[EMAIL PROTECTED]> wrote:
> Onat I. wrote:
> > i wrote a simple cd encoder. while there is abcde
> > in ports, it is bloated and requires cdparanoia
> > which is unnecessary since cdio can now rip cds.
>
> You still require lame, which is in ports.
>
> > I thought you might be interested.
>
> Somewhat. But abcde finds the track names automatically.
>
> And there are a few basic Unix shell issues with your script. At the
> very least, combine the two tr steps into one.
>
> ian:52$ echo '01 Foo Bar' | tr -d [:alpha:]|tr -d '[:punct:]
> 01
> ian:53$ echo '01 Foo Bar' | tr -d '[:alpha:][:punct:]'
> 01
>
> And, always quote special characters:
>
> ian:19$ echo [:alpha:]
> [:alpha:]
> ian:20$ touch a
> ian:21$ echo [:alpha:]
> a
> ian:22$ echo '[:alpha:]'
> [:alpha:]
> ian:23$
>
> But, if your goal in the tr is just to get rid of non-digits, use tr -c:
>
> ian:55$ echo '01 Foo Bar' | tr -cd '[:digit:]\n'
> 01
> ian:56$
>
I'm aware that I still require lame but the less
dependency the better, I thought.

When it comes to finding song names automatically,
it can be fixed since cdio can do that too. I just
wanted a simple script which can be used while
offline too.

Thanks a lot for fixing the script, and even for
replying my message. I didn't expect such a quick
reply.

Onat ISIK

Reply via email to