From: Junio C Hamano Date: Wed, 12 Dec 2018 07:40:51 GMT Subject: Re: [PATCH 5/5] midx: implement midx_repack() Message-ID: In-Reply-To: <41ef671ec8361a9635dc78c078d2d84e9d985236.1544465177.git.gitgitgadget@gmail.com> "Derrick Stolee via GitGitGadget" writes: > + SECOND_SMALLEST_SIZE=$(ls -l .git/objects/pack/*pack | awk "{print \$5;}" | sort -n | head -n 2 | tail -n 1) && awk is capable of remembering $5 from each line of input, sorting them and picking the second smallest element from it, isn't it? > + BATCH_SIZE=$(($SECOND_SMALLEST_SIZE + 1)) && ... or incrementing the number by one, before reporting, for that matter.