[pacman-dev] [PATCH] Remove use of `seq` in pactree
Daenyth Blank
daenyth+arch at gmail.com
Thu Oct 7 17:03:21 EDT 2010
On Thu, Oct 7, 2010 at 16:52, Dan McGee <dan at archlinux.org> wrote:
> This is not a bash builtin, so can potentially cause portability issues.
> Additionally, the use of it is completely unnecessary as it can all be done
> within bash (and done faster).
>
> $ time pactree xfwm4 >/dev/null (old version)
> real 0m3.245s
>
> $ time ./contrib/pactree xfwm4 >/dev/null (new version)
> real 0m3.042s
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
> ---
If we accept a dependency on bash >= 4, we can further reduce that all
to a brace expansion:
daenyth at Bragi ~ $ echo {01..10}
01 02 03 04 05 06 07 08 09 10
More information about the pacman-dev
mailing list