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

Re: /bin/sh diversions

Thorsten Glaser <tg@mirbsd.de> writes:

> Thanks for keeping me in the Cc â?º (but I guess I earned that from a PR)
> Marco d'Itri dixit:
>>Bad idea
> Give the user the tools to shoot himself into the foot. Besides, dash
> is already using the debconf dance, so why discriminate other shells
> that are fine to do it according to policy?
>>bash (the standard
> Which standard? It's not even POSIX conformant because of its extensions.
> Most operating systems don't come with GNU bash either.
>>which works with everything
> set -A foo
> find . -name \*mp3 |&
> while read name; do foo[${#foo[*]}]=$name; done
> mpg123 -z "${foo[@]}"
> I see two things in this (here splitted) one-liner I use often that don't
> work with bash, which is expected, as they are features of the Korn shell.

Well, just do it better and it works everywhere:

find -name \*mp3 -print0 | xargs -0 mpg123 -z


Reply to: