From 314f2a37b4a07e90d1d0578959ea3f99c7805ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Mon, 23 Nov 2020 14:51:27 +0100 Subject: [PATCH] Numberation from 1 to n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .local/bin/emerge-logs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/emerge-logs b/.local/bin/emerge-logs index 142f611..0fac1ac 100755 --- a/.local/bin/emerge-logs +++ b/.local/bin/emerge-logs @@ -2,9 +2,9 @@ LOGS=( $(sudo find /var/tmp/portage/ -mindepth 1 -maxdepth 5 -name "build.log") ) LEN=${#LOGS[@]} -for (( i=1; i<$LEN; i++ )); +for (( i=0; i<$LEN; i++ )); do - echo "$i - ${LOGS[$i-1]}" + echo "$(( $i + 1 )) - ${LOGS[$i]}" done echo