[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting
From: |
Robbie Harwood |
Subject: |
Re: [PATCH v2] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items |
Date: |
Wed, 04 May 2022 10:43:54 -0400 |
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:
> +version_reverse_sort ()
> +{
> + case $version_reverse_sort_sort_has_v in
Does this need to be its own variable, or could it just reuse
version_sort_sort_has_v?
> +reverse_sorted_list=$(echo $list | tr ' ' '\n' | sed 's/$/ 2/' | sed
> 's/\.old 2/ 1/' | version_reverse_sort | sed 's/ 1$/.old/' | sed 's/ 2$//')
Could the `sed | sed` pattern be collapsed into a single invocation
using multiple -e switches?1
Be well,
--Robbie
signature.asc
Description: PGP signature